#include <ctype.h>
#include <stdlib.h>
+#include "atoi/strtou_noneg.h"
#include "defines.h"
#include "prototypes.h"
return -1;
errno = 0;
- n = strtoul(&range[1], &endptr, 10);
+ n = strtoul_noneg(&range[1], &endptr, 10);
if (('\0' != *endptr) || (0 != errno))
return -1;
*max = n;
} else {
errno = 0;
- n = strtoul(range, &endptr, 10);
+ n = strtoul_noneg(range, &endptr, 10);
if (endptr == range || 0 != errno)
return -1;
*has_min = true;
*min = n;
errno = 0;
- n = strtoul(endptr, &endptr, 10);
+ n = strtoul_noneg(endptr, &endptr, 10);
if ('\0' != *endptr || 0 != errno)
return -1;
#include <errno.h>
#include <limits.h>
#include <stdio.h>
+
+#include "atoi/strtou_noneg.h"
#include "defines.h"
#include "prototypes.h"
#include "shadowlog.h"
return fallback;
errno = 0;
- epoch = strtoull(source_date_epoch, &endptr, 10);
+ epoch = strtoull_noneg(source_date_epoch, &endptr, 10);
if (errno != 0) {
fprintf (shadow_logfd,
_("Environment variable $SOURCE_DATE_EPOCH: strtoull: %s\n"),
#include <stdlib.h>
#include <errno.h>
+#include "atoi/strtou_noneg.h"
#include "prototypes.h"
unsigned long val;
errno = 0;
- val = strtoul(numstr, &endptr, 0);
+ val = strtoul_noneg(numstr, &endptr, 0);
if (('\0' == *numstr) || ('\0' != *endptr) || (0 != errno))
return -1;
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
+
+#include "atoi/strtou_noneg.h"
#include "defines.h"
#include "prototypes.h"
#include "subordinateio.h"
owner = argv[1];
check_uids = argv[2][0] == 'u';
errno = 0;
- start = strtoul(argv[3], NULL, 10);
+ start = strtoul_noneg(argv[3], NULL, 10);
if (errno != 0)
exit(1);
- count = strtoul(argv[4], NULL, 10);
+ count = strtoul_noneg(argv[4], NULL, 10);
if (errno != 0)
exit(1);
if (check_uids) {