cc -Wextra

This commit is contained in:
Connor Lane Smith
2011-06-21 05:05:37 +01:00
parent 04162bd7b0
commit d7f9bda740
8 changed files with 22 additions and 19 deletions

View File

@@ -8,9 +8,9 @@ char *
agetcwd(void)
{
char *buf;
size_t size;
long size;
if((size = pathconf(".", _PC_PATH_MAX)) < 0)
if((size = pathconf(".", _PC_PATH_MAX)) == -1)
size = BUFSIZ;
if(!(buf = malloc(size)))
eprintf("malloc:");

View File

@@ -25,7 +25,7 @@ enmasse(int argc, char **argv, int (*fn)(const char *, const char *))
else
dir = argv[--argc];
if((size = pathconf(dir, _PC_PATH_MAX)) < 0)
if((size = pathconf(dir, _PC_PATH_MAX)) == -1)
size = BUFSIZ;
if(!(buf = malloc(size)))
eprintf("malloc:");