diff options
Diffstat (limited to 'coreutils/realpath.c')
-rw-r--r-- | coreutils/realpath.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/coreutils/realpath.c b/coreutils/realpath.c index bcb73a8..6766524 100644 --- a/coreutils/realpath.c +++ b/coreutils/realpath.c @@ -13,7 +13,7 @@ #include "libbb.h" int realpath_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int realpath_main(int argc, char **argv) +int realpath_main(int argc ATTRIBUTE_UNUSED, char **argv) { int retval = EXIT_SUCCESS; @@ -25,19 +25,18 @@ int realpath_main(int argc, char **argv) # define resolved_path_MUST_FREE 0 #endif - if (--argc == 0) { + if (!*++argv) { bb_show_usage(); } do { - argv++; if (realpath(*argv, resolved_path) != NULL) { puts(resolved_path); } else { retval = EXIT_FAILURE; bb_simple_perror_msg(*argv); } - } while (--argc); + } while (*++argv); #if ENABLE_FEATURE_CLEAN_UP && resolved_path_MUST_FREE RELEASE_CONFIG_BUFFER(resolved_path); |