Skip to content

Loading…

Removed unnecessary check #7

Merged
merged 2 commits into from

2 participants

@flagoworld

"0" is always the smallest value of an unsigned integer, so I removed the unnecessary check against it.

Ryan Layne added some commits
Ryan Layne Removed unnecessary check
Removed unnecessary check: (0<=cd), where "cd" is an unsigned int. 0
Will always be the smallest number that an unsigned int can be.
444d618
Ryan Layne Whoops
Removed unnecessary parenthesis
fb7358c
@netshade
Owner

Looks good, thanks for the contribution. I am seriously ashamed that it took me this long to address your pull request, I truly appreciate you sending code.

Thanks!

@netshade netshade merged commit bd2c000 into netshade:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 6, 2012
  1. Removed unnecessary check

    Ryan Layne committed
    Removed unnecessary check: (0<=cd), where "cd" is an unsigned int. 0
    Will always be the smallest number that an unsigned int can be.
  2. Whoops

    Ryan Layne committed
    Removed unnecessary parenthesis
Showing with 1 addition and 1 deletion.
  1. +1 −1 JapanPostBarcode.m
View
2 JapanPostBarcode.m
@@ -182,7 +182,7 @@ - (void)generateChecksum
}
}
cd = 19 * (checkValue / 19 + 1) - checkValue;
- if ((0 <= cd) && (10 > cd))
+ if (10 > cd)
character = '0' + cd;
else {
if (10 == cd)
Something went wrong with that request. Please try again.