Skip to content

clone example: don't divide by zero - #2815

Merged
carlosmn merged 1 commit into
libgit2:masterfrom
ethomson:example
Jan 12, 2015
Merged

clone example: don't divide by zero#2815
carlosmn merged 1 commit into
libgit2:masterfrom
ethomson:example

Conversation

@ethomson

Copy link
Copy Markdown
Member

Local transports don't have data about the size, avoid dividing by
zero in the callback.

Fixes #2812

Comment thread examples/network/clone.c Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't total_steps checked below?

Local transports don't have data about the size, avoid dividing by
zero in the callback.
@Therzok

Therzok commented Jan 10, 2015

Copy link
Copy Markdown
Member

That looks way better. 👍

@ethomson

Copy link
Copy Markdown
Member Author

Thanks, @Therzok !

carlosmn added a commit that referenced this pull request Jan 12, 2015
clone example: don't divide by zero
@carlosmn
carlosmn merged commit 04bdd97 into libgit2:master Jan 12, 2015
@ethomson
ethomson deleted the example branch February 5, 2015 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

clone bare repo ended with"Floating point exception"

4 participants