--- projects/libstatgrab/src/libstatgrab/error.c 2004/07/16 15:28:02 1.13 +++ projects/libstatgrab/src/libstatgrab/error.c 2004/07/18 20:39:02 1.14 @@ -18,7 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA * 02111-1307 USA * - * $Id: error.c,v 1.13 2004/07/16 15:28:02 tdb Exp $ + * $Id: error.c,v 1.14 2004/07/18 20:39:02 ats Exp $ */ #ifdef HAVE_CONFIG_H @@ -38,6 +38,7 @@ static char error_arg[ERROR_ARG_MAX]; static int errno_value = 0; void sg_set_error(sg_error code, const char *arg) { + errno_value = 0; error = code; if (arg != NULL) { sg_strlcpy(error_arg, arg, sizeof error_arg); @@ -49,8 +50,8 @@ void sg_set_error(sg_error code, const char *arg) { } void sg_set_error_with_errno(sg_error code, const char *arg) { - errno_value = errno; sg_set_error(code, arg); + errno_value = errno; } sg_error sg_get_error() {