summaryrefslogtreecommitdiffstats
path: root/apps/speed.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2011-03-16 16:55:12 +0000
committerDr. Stephen Henson <steve@openssl.org>2011-03-16 16:55:12 +0000
commit3393e0c02caa3a6541ac028179025eba6a55f9d5 (patch)
tree1384b717b106018a951ae64eaddc5c11518efa58 /apps/speed.c
parenta149b2466e8adb97b1fe855d189bac58d3b654dd (diff)
Fix SRP error codes (from HEAD).
Diffstat (limited to 'apps/speed.c')
-rw-r--r--apps/speed.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/apps/speed.c b/apps/speed.c
index 65f85fecf7..24f18b8f6c 100644
--- a/apps/speed.c
+++ b/apps/speed.c
@@ -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;