diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-11-27 16:49:31 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-11-27 16:49:31 +0000 |
commit | 079f8afa0a16112cbaf7012c82b38b7358b82141 (patch) | |
tree | 0d8cba8e45b1a8b975e0b8c7a8377703ab5547a6 /coreutils/test.c | |
parent | 10d0d4eec7e3a292917f43f72afae20341d9ba11 (diff) | |
download | busybox-w32-079f8afa0a16112cbaf7012c82b38b7358b82141.tar.gz busybox-w32-079f8afa0a16112cbaf7012c82b38b7358b82141.tar.bz2 busybox-w32-079f8afa0a16112cbaf7012c82b38b7358b82141.zip |
style cleanup: return(a) -> return a, part 1
Diffstat (limited to 'coreutils/test.c')
-rw-r--r-- | coreutils/test.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/coreutils/test.c b/coreutils/test.c index c1097c28c..ebb4f9086 100644 --- a/coreutils/test.c +++ b/coreutils/test.c | |||
@@ -520,17 +520,17 @@ static int test_eaccess(char *path, int mode) | |||
520 | unsigned int euid = geteuid(); | 520 | unsigned int euid = geteuid(); |
521 | 521 | ||
522 | if (stat(path, &st) < 0) | 522 | if (stat(path, &st) < 0) |
523 | return (-1); | 523 | return -1; |
524 | 524 | ||
525 | if (euid == 0) { | 525 | if (euid == 0) { |
526 | /* Root can read or write any file. */ | 526 | /* Root can read or write any file. */ |
527 | if (mode != X_OK) | 527 | if (mode != X_OK) |
528 | return (0); | 528 | return 0; |
529 | 529 | ||
530 | /* Root can execute any file that has any one of the execute | 530 | /* Root can execute any file that has any one of the execute |
531 | bits set. */ | 531 | bits set. */ |
532 | if (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)) | 532 | if (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)) |
533 | return (0); | 533 | return 0; |
534 | } | 534 | } |
535 | 535 | ||
536 | if (st.st_uid == euid) /* owner */ | 536 | if (st.st_uid == euid) /* owner */ |
@@ -539,9 +539,9 @@ static int test_eaccess(char *path, int mode) | |||
539 | mode <<= 3; | 539 | mode <<= 3; |
540 | 540 | ||
541 | if (st.st_mode & mode) | 541 | if (st.st_mode & mode) |
542 | return (0); | 542 | return 0; |
543 | 543 | ||
544 | return (-1); | 544 | return -1; |
545 | } | 545 | } |
546 | 546 | ||
547 | static void initialize_group_array(void) | 547 | static void initialize_group_array(void) |
@@ -560,7 +560,7 @@ static int is_a_group_member(gid_t gid) | |||
560 | 560 | ||
561 | /* Short-circuit if possible, maybe saving a call to getgroups(). */ | 561 | /* Short-circuit if possible, maybe saving a call to getgroups(). */ |
562 | if (gid == getgid() || gid == getegid()) | 562 | if (gid == getgid() || gid == getegid()) |
563 | return (1); | 563 | return 1; |
564 | 564 | ||
565 | if (ngroups == 0) | 565 | if (ngroups == 0) |
566 | initialize_group_array(); | 566 | initialize_group_array(); |
@@ -568,9 +568,9 @@ static int is_a_group_member(gid_t gid) | |||
568 | /* Search through the list looking for GID. */ | 568 | /* Search through the list looking for GID. */ |
569 | for (i = 0; i < ngroups; i++) | 569 | for (i = 0; i < ngroups; i++) |
570 | if (gid == group_array[i]) | 570 | if (gid == group_array[i]) |
571 | return (1); | 571 | return 1; |
572 | 572 | ||
573 | return (0); | 573 | return 0; |
574 | } | 574 | } |
575 | 575 | ||
576 | 576 | ||