identification: Make `written` signed to fix error checking when printing ranges
authorTobias Brunner <tobias@strongswan.org>
Fri, 11 Mar 2016 09:06:58 +0000 (10:06 +0100)
committerTobias Brunner <tobias@strongswan.org>
Fri, 11 Mar 2016 09:09:02 +0000 (10:09 +0100)
src/libstrongswan/utils/identification.c

index 9842458..2b2e907 100644 (file)
@@ -980,9 +980,9 @@ int identification_printf_hook(printf_hook_data_t *data,
 {
        private_identification_t *this = *((private_identification_t**)(args[0]));
        chunk_t proper;
-       char buf[BUF_LEN];
-       char *pos;
-       size_t written, len, address_size;
+       char buf[BUF_LEN], *pos;
+       size_t len, address_size;
+       int written;
 
        if (this == NULL)
        {