X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=compat%2Fgetdelim.c;h=1bedef7c903ccb1b2296ef59d674a6d2f898f067;hb=7fd7611b23ad33ed8bb7db44916cb03bbc2c47c1;hp=b74e5b5350055d63cbd667bdb3c7625ce88fca44;hpb=96c9109d94ddd985994cb431080d2823688b0ed6;p=notmuch diff --git a/compat/getdelim.c b/compat/getdelim.c index b74e5b53..1bedef7c 100644 --- a/compat/getdelim.c +++ b/compat/getdelim.c @@ -19,7 +19,7 @@ /* Ported from glibc by Simon Josefsson. */ -#include +#include "compat.h" #include @@ -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 */