]> git.notmuchmail.org Git - notmuch/blobdiff - compat/getdelim.c
compat/getdelim: Silence a warning about mixing of signed/unsigned.
[notmuch] / compat / getdelim.c
index b74e5b5350055d63cbd667bdb3c7625ce88fca44..1bedef7c903ccb1b2296ef59d674a6d2f898f067 100644 (file)
@@ -19,7 +19,7 @@
 
 /* Ported from glibc by Simon Josefsson. */
 
-#include <config.h>
+#include "compat.h"
 
 #include <stdio.h>
 
@@ -124,7 +124,7 @@ getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp)
        break;
     }
   (*lineptr)[cur_len] = '\0';
-  result = cur_len ? cur_len : result;
+  result = cur_len ? (ssize_t) cur_len : result;
 
  unlock_return:
   funlockfile (fp); /* doesn't set errno */