Fix a compiler warning
authorRoy Marples <roy@marples.name>
Mon, 29 Sep 2014 09:05:47 +0000 (09:05 +0000)
committerRoy Marples <roy@marples.name>
Mon, 29 Sep 2014 09:05:47 +0000 (09:05 +0000)
src/libdhcpcd/dhcpcd.c

index 5008420536b4dfcf04ca01869876e0606f24acf1..a2295dc931ccbed704dec5a9063ea8b2c70080d3 100644 (file)
@@ -300,7 +300,8 @@ dhcpcd_decode_hex(char *dst, size_t dlen, const char *src)
 ssize_t
 dhcpcd_decode_shell(char *dst, size_t dlen, const char *src)
 {
-       char *tmp, *p, c, *e, *d;
+       char *tmp, *p, *e, *d;
+       int c;
        ssize_t l;
 
        assert(dst);
@@ -325,11 +326,11 @@ dhcpcd_decode_shell(char *dst, size_t dlen, const char *src)
                                errno = ENOSPC;
                                return -1;
                        }
-                       *d++ = c;
+                       *d++ = (char)c;
                        dlen--;
                        continue;
                }
-               
+
                if (dlen < 5) {
                        errno = ENOSPC;
                        return -1;