projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
.
[gnulib.git]
/
lib
/
modechange.c
diff --git
a/lib/modechange.c
b/lib/modechange.c
index
71432fa
..
ef484c0
100644
(file)
--- a/
lib/modechange.c
+++ b/
lib/modechange.c
@@
-157,7
+157,7
@@
mode_compile (const char *mode_string, unsigned int masked_ops)
{
struct mode_change *head; /* First element of the linked list. */
struct mode_change *tail; /* An element of the linked list. */
{
struct mode_change *head; /* First element of the linked list. */
struct mode_change *tail; /* An element of the linked list. */
- u
nsigned long mode_value;
/* The mode value, if octal. */
+ u
intmax_t mode_value;
/* The mode value, if octal. */
char *string_end; /* Pointer to end of parsed value. */
mode_t umask_value; /* The umask value (surprise). */
char *string_end; /* Pointer to end of parsed value. */
mode_t umask_value; /* The umask value (surprise). */
@@
-166,10
+166,10
@@
mode_compile (const char *mode_string, unsigned int masked_ops)
tail = NULL;
#endif
tail = NULL;
#endif
- if (xstrtou
l
(mode_string, &string_end, 8, &mode_value, "") == LONGINT_OK)
+ if (xstrtou
max
(mode_string, &string_end, 8, &mode_value, "") == LONGINT_OK)
{
struct mode_change *p;
{
struct mode_change *p;
- if (mode_value
> CHMOD_MODE_BITS
)
+ if (mode_value
!= (mode_value & CHMOD_MODE_BITS)
)
return MODE_INVALID;
p = make_node_op_equals ((mode_t) mode_value);
if (p == NULL)
return MODE_INVALID;
p = make_node_op_equals ((mode_t) mode_value);
if (p == NULL)