diff options
author | Gleydson Soares <gsoares@cvs.openbsd.org> | 2012-10-30 20:03:17 +0000 |
---|---|---|
committer | Gleydson Soares <gsoares@cvs.openbsd.org> | 2012-10-30 20:03:17 +0000 |
commit | 2ca5bf7e8ac4efaa27b8c4c787bf3218d2be26fc (patch) | |
tree | 8b34da5996fc8e20670ed56b1d020bf6305f515e | |
parent | 1721d77e423e622f2a9d018651a15c36a5f3a17e (diff) |
fdopen(3) return a FILE * not an int, so compare against NULL.
no functional change
OK millert@
-rw-r--r-- | usr.bin/sort/sort.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/sort/sort.c b/usr.bin/sort/sort.c index adfcca6b2de..4c8e631e811 100644 --- a/usr.bin/sort/sort.c +++ b/usr.bin/sort/sort.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sort.c,v 1.39 2009/12/22 19:47:02 schwarze Exp $ */ +/* $OpenBSD: sort.c,v 1.40 2012/10/30 20:03:16 gsoares Exp $ */ /*- * Copyright (c) 1993 @@ -281,7 +281,7 @@ main(int argc, char *argv[]) (void)umask(um); if ((outfd = mkstemp(toutpath)) == -1 || fchmod(outfd, DEFFILEMODE & ~um) == -1 || - (outfp = fdopen(outfd, "w")) == 0) + (outfp = fdopen(outfd, "w")) == NULL) err(2, "%s", toutpath); outfile = toutpath; |