return status;
}
-#define ISOCTAL(c) ((c)>='0'&&(c)<='7')
+static bool
+is_octal_digit (char c)
+{
+ return '0' <= c && c <= '7';
+}
/* Decode things from a file HEADER block into STAT_INFO, also setting
*FORMAT_POINTER depending on the header block format. If
if (strcmp (header->header.magic, TMAGIC) == 0)
{
if (header->star_header.prefix[130] == 0
- && ISOCTAL (header->star_header.atime[0])
+ && is_octal_digit (header->star_header.atime[0])
&& header->star_header.atime[11] == ' '
- && ISOCTAL (header->star_header.ctime[0])
+ && is_octal_digit (header->star_header.ctime[0])
&& header->star_header.ctime[11] == ' ')
format = STAR_FORMAT;
else if (stat_info->xhdr.size)
}
value = 0;
- if (ISODIGIT (*where))
+ if (is_octal_digit (*where))
{
char const *where1 = where;
bool overflow = false;
for (;;)
{
value += *where++ - '0';
- if (where == lim || ! ISODIGIT (*where))
+ if (where == lim || ! is_octal_digit (*where))
break;
overflow |= value != (value << LG_8 >> LG_8);
value <<= LG_8;
{
value += 7 - digit;
where++;
- if (where == lim || ! ISODIGIT (*where))
+ if (where == lim || ! is_octal_digit (*where))
break;
digit = *where - '0';
overflow |= value != (value << LG_8 >> LG_8);