summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--authdb.c2
-rw-r--r--blob.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/authdb.c b/authdb.c
index 304c03e..e6e71c4 100644
--- a/authdb.c
+++ b/authdb.c
@@ -154,7 +154,7 @@ void *authdb_get(struct authdb *adb, sockaddr_any *addr, struct authdb_entry *en
if (b.len < 4)
return NULL;
- e = b.ptr[0];
+ e = (unsigned char) b.ptr[0];
b.ptr[0] = 0x00;
hash = b.ptr[1] + b.ptr[2] + b.ptr[3];
diff --git a/blob.c b/blob.c
index 2c5dd17..1604308 100644
--- a/blob.c
+++ b/blob.c
@@ -144,7 +144,7 @@ unsigned long blob_inet_addr(blob_t b)
ip += blob_pull_uint(&b, 10);
if (b.len != 0)
return 0;
- return ip;
+ return htonl(ip);
}