NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/51808: [PATCH] tests/lib/libc/gen/t_dir: fix various coverity issues



Dangit. I did it properly on FreeBSD, but screwed up when I submitted the patch for NetBSD. The -1 should be outside the parentheses in CREAT :’(.
I think this is my cue to step away from the keyboard for a bit…
-Ngie

-bash-4.4$ cvs diff -u t_dir.c 
Index: t_dir.c
===================================================================
RCS file: /cvsroot/src/tests/lib/libc/gen/t_dir.c,v
retrieving revision 1.8
diff -u -r1.8 t_dir.c
--- t_dir.c     11 Jan 2017 07:26:17 -0000      1.8
+++ t_dir.c     11 Jan 2017 08:35:23 -0000
@@ -57,7 +57,7 @@

 

 #define        CREAT(x, m)     do {                                            \
                int _creat_fd;                                          \
-               ATF_REQUIRE_MSG((_creat_fd = creat((x), (m)) != -1),    \
+               ATF_REQUIRE_MSG((_creat_fd = creat((x), (m))) != -1,    \
                    "creat(%s, %x) failed: %s", (x), (m),               \
                    strerror(errno));                                   \
                (void)close(_creat_fd);                                 \


Home | Main Index | Thread Index | Old Index