X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Futil.c;h=ff4325616f5d94b9e44cde7b7edee1fe053533f1;hb=0c7eb690076101d19e04d98df6d056dd73acb2c9;hp=0c70710dde0c28a9b1779862dd7c5a485ce1d0ac;hpb=82b05cb81e54503bc725df3a6eab06858c3db0be;p=sliver-openvswitch.git diff --git a/lib/util.c b/lib/util.c index 0c70710dd..ff4325616 100644 --- a/lib/util.c +++ b/lib/util.c @@ -33,6 +33,7 @@ #include #include "util.h" +#include #include #include #include @@ -138,6 +139,7 @@ ofp_fatal(int err_no, const char *format, ...) void ofp_error(int err_no, const char *format, ...) { + int save_errno = errno; va_list args; fprintf(stderr, "%s: ", program_name); @@ -147,6 +149,8 @@ ofp_error(int err_no, const char *format, ...) if (err_no != 0) fprintf(stderr, " (%s)", strerror(err_no)); putc('\n', stderr); + + errno = save_errno; } /* Sets program_name based on 'argv0'. Should be called at the beginning of