Better error handler

git-svn: trunk@1736
remotes/push_mirror/metadata
Nigel Horne 20 years ago
parent 4976090535
commit ed734e1687
  1. 10
      clamav-devel/libclamav/untar.c

@ -21,6 +21,9 @@
*
* Change History:
* $Log: untar.c,v $
* Revision 1.28 2005/10/29 16:18:09 nigelhorne
* Better error handler
*
* Revision 1.27 2005/09/01 21:03:46 nigelhorne
* Added support for various GNU extensions
*
@ -103,7 +106,7 @@
* First draft
*
*/
static char const rcsid[] = "$Id: untar.c,v 1.27 2005/09/01 21:03:46 nigelhorne Exp $";
static char const rcsid[] = "$Id: untar.c,v 1.28 2005/10/29 16:18:09 nigelhorne Exp $";
#include <stdio.h>
#include <errno.h>
@ -128,9 +131,10 @@ static char const rcsid[] = "$Id: untar.c,v 1.27 2005/09/01 21:03:46 nigelhorne
static int
octal(const char *str)
{
int ret = -1;
int ret;
(void)sscanf(str, "%o", (unsigned int *)&ret);
if(sscanf(str, "%o", (unsigned int *)&ret) != 1)
return -1;
return ret;
}

Loading…
Cancel
Save