removenote, this is correct, make i unsigned though - sdhcp - simple dhcp client
(HTM) git clone git://git.codemadness.org/sdhcp
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
(DIR) commit 253bb65b9f029890469c3726c446daf34747bcba
(DIR) parent 19e0ab7cc747ad5f6f239e484531a5fec0626e14
(HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Fri, 25 Apr 2014 21:52:54 +0200
removenote, this is correct, make i unsigned though
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
Diffstat:
M sdhcp.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
(DIR) 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;
}