]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: shut a gcc warning introduced by commit 269ab31
authorWilly Tarreau <w@1wt.eu>
Fri, 7 Sep 2012 20:18:59 +0000 (22:18 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 8 Sep 2012 06:24:51 +0000 (08:24 +0200)
Usual warning on unchecked write() on which no operation is possible.

src/haproxy.c

index def0f3fb9bb9c7682d3941cdc40581f20cd01d07..f5840d29f7813592b60c33a91ebcb0b9cc248789 100644 (file)
@@ -1366,7 +1366,7 @@ int main(int argc, char **argv)
                        if (pidfd >= 0) {
                                char pidstr[100];
                                snprintf(pidstr, sizeof(pidstr), "%d\n", ret);
-                               write(pidfd, pidstr, strlen(pidstr));
+                               if (write(pidfd, pidstr, strlen(pidstr)) < 0) /* shut gcc warning */;
                        }
                        relative_pid++; /* each child will get a different one */
                }