removenote, this is correct, make i unsigned though - sdhcp - simple dhcp client | |
git clone git://git.codemadness.org/sdhcp | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit 253bb65b9f029890469c3726c446daf34747bcba | |
parent 19e0ab7cc747ad5f6f239e484531a5fec0626e14 | |
Author: Hiltjo Posthuma <[email protected]> | |
Date: Fri, 25 Apr 2014 21:52:54 +0200 | |
removenote, this is correct, make i unsigned though | |
Signed-off-by: Hiltjo Posthuma <[email protected]> | |
Diffstat: | |
M sdhcp.c | 6 +++--- | |
1 file changed, 3 insertions(+), 3 deletions(-) | |
--- | |
diff --git a/sdhcp.c b/sdhcp.c | |
@@ -103,11 +103,11 @@ die(char *str) | |
} | |
static void | |
-hnput(unsigned char *dst, unsigned long long src, int n) | |
+hnput(unsigned char *dst, unsigned long long src, size_t n) | |
{ | |
- int i; | |
+ unsigned int i; | |
- for(i = 0; n--; i++) /* TODO: --n ? */ | |
+ for(i = 0; n--; i++) | |
dst[i] = (src >> (n * 8)) & 0xff; | |
} | |