Fix warnings about ignored return values.
authorDr. Stephen Henson <steve@openssl.org>
Thu, 17 Mar 2011 14:43:13 +0000 (14:43 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Wed, 6 Aug 2014 20:04:08 +0000 (21:04 +0100)
(cherry picked from commit 27131fe8f7418bf22b1e3000ea6a5d7b1ec8ebd4)
Reviewed-by: Matt Caswell <matt@openssl.org>
apps/speed.c

index 65f85fecf7f3d231688e9433df83d848f36a9852..24f18b8f6c0c9612b74290ee26b6a18a187b3388 100644 (file)
@@ -2608,7 +2608,11 @@ static int do_multi(int multi)
        fds=malloc(multi*sizeof *fds);
        for(n=0 ; n < multi ; ++n)
                {
-               pipe(fd);
+               if (pipe(fd) == -1)
+                       {
+                       fprintf(stderr, "pipe failure\n");
+                       exit(1);
+                       }
                fflush(stdout);
                fflush(stderr);
                if(fork())
@@ -2620,7 +2624,11 @@ static int do_multi(int multi)
                        {
                        close(fd[0]);
                        close(1);
-                       dup(fd[1]);
+                       if (dup(fd[1]) == -1)
+                               {
+                               fprintf(stderr, "dup failed\n");
+                               exit(1);
+                               }
                        close(fd[1]);
                        mr=1;
                        usertime=0;