From: root Date: Fri, 15 Nov 2019 08:25:47 +0000 (-0800) Subject: bug fixe X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1bdb456ee7767a75d266716459a85743740acc33;p=c11tester.git bug fixe --- diff --git a/pipe.cc b/pipe.cc index 37bb0dc6..b915c792 100644 --- a/pipe.cc +++ b/pipe.cc @@ -1,7 +1,9 @@ #include "common.h" #include #include "model.h" +#include "snapshot-interface.h" #include +#include static int (*pipe_init_p)(int filep[2]) = NULL; @@ -12,11 +14,12 @@ int pipe(int fildes[2]) { model->startChecker(); } if (!pipe_init_p) { - pipe_init_p = (int (*)(int file[2])) dlsym(RTLD_NEXT, "pipe"); - if ((error = dlerror()) != NULL) { + pipe_init_p = (int (*)(int fildes[2])) dlsym(RTLD_NEXT, "pipe"); + char *error = dlerror(); + if (error != NULL) { fputs(error, stderr); exit(EXIT_FAILURE); } } - pipe_init_p(filedes); + return pipe_init_p(fildes); }