points to the start of a string, as the C Standard says the
resulting behavior is undefined.
umask_value = umask (0);
umask (umask_value); /* Restore the old value. */
- --mode_string;
/* One loop iteration for each "ugoa...=+-rwxXstugo...[=+-rwxXstugo...]". */
- do
+ for (;; mode_string++)
{
/* Which bits in the mode are operated on. */
mode_t affected_bits = 0;
bool who_specified_p;
/* Turn on all the bits in `affected_bits' for each group given. */
- for (++mode_string;; ++mode_string)
+ for (;; mode_string++)
switch (*mode_string)
{
case 'u':
}
no_more_values:;
}
- } while (*mode_string == ',');
+
+ if (*mode_string != ',')
+ break;
+ }
+
if (*mode_string == 0)
return head;
invalid: