Convert to ANSI C

This commit is contained in:
Todd C. Miller
2010-03-04 20:18:22 -05:00
parent 6470a057e1
commit c857c74e3a
14 changed files with 55 additions and 117 deletions

View File

@@ -39,14 +39,15 @@
# endif
#endif /* HAVE_STRING_H */
#include "sudo.h"
#include "compat.h"
#include "missing.h"
int
atobool(const char *str)
{
if (strcasecmp(str, "true") == 0 || strcmp(str, "1") == 0)
return TRUE;
return 1;
if (strcasecmp(str, "false") == 0 || strcmp(str, "0") == 0)
return FALSE;
return 0;
return -1;
}