From: Christos Zoulas Date: Wed, 11 Nov 2015 22:30:29 +0000 (+0000) Subject: more symbolic constants X-Git-Tag: FILE5_26~82 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=98d0e47e07366bca777d20137bd4ce80f8ae9941;p=file more symbolic constants --- diff --git a/src/compress.c b/src/compress.c index 49581c10..647f1d6e 100644 --- a/src/compress.c +++ b/src/compress.c @@ -35,7 +35,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: compress.c,v 1.86 2015/11/11 22:22:19 christos Exp $") +FILE_RCSID("@(#)$File: compress.c,v 1.87 2015/11/11 22:26:30 christos Exp $") #endif #include "magic.h" @@ -535,7 +535,7 @@ static void copydesc(int i, int *fd) { (void) close(i); - if (dup(fd[i == 0 ? 0 : 1]) == -1) { + if (dup(fd[i == STDIN_FILENO ? 0 : 1]) == -1) { abort(); DPRINTF("dup[%d] failed (%s)\n", i, strerror(errno)); exit(1); @@ -658,7 +658,7 @@ uncompressbuf(int fd, size_t method, const unsigned char *old, (void)execvp(compr[method].argv[0], (char *const *)(intptr_t)compr[method].argv); - dprintf(2, "exec `%s' failed, %s", + dprintf(STDERR_FILENO, "exec `%s' failed, %s", compr[method].argv[0], strerror(errno)); exit(1); /*NOTREACHED*/