summaryrefslogtreecommitdiff
path: root/utils.c
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2014-11-25 23:49:38 +0100
committerPrzemyslaw Pawelczyk <przemoc@gmail.com>2015-02-07 23:31:43 +0100
commit31146f6d2a6518615f12bed375420a6d284fea61 (patch)
tree957f1f964f78d11d63f6edfddc5ad4393df4d423 /utils.c
parent00e0d24cda49e88b4b66ed5bef8213698fd262a1 (diff)
Avoid comparison between signed and unsigned integers.
This removes warnings shown during build with -Wextra flag. Signed-off-by: Przemyslaw Pawelczyk <przemoc@gmail.com>
Diffstat (limited to 'utils.c')
-rw-r--r--utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils.c b/utils.c
index a96e56e..0369612 100644
--- a/utils.c
+++ b/utils.c
@@ -121,7 +121,7 @@ void
write_int(uint64_t value, size_t len, FILE *to)
{
char buf[len];
- int i;
+ size_t i;
for (i = 0; i < len; i++)
buf[i] = ((value >> (8 * i)) & 0xff);
@@ -147,7 +147,7 @@ uint64_t
read_int(char **from, size_t len, const char *max)
{
uint64_t result = 0;
- int i;
+ size_t i;
if (*from + len > max) {
msg(MSG_CRITICAL,