diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2004-08-09 23:40:49 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2004-08-09 23:40:49 +0000 |
commit | 290ba4ab1d157acc459991ae2a77a18cc96ffe07 (patch) | |
tree | 6d1f24c39f8d8dd5dcc4f56df8e4f62aac919e45 | |
parent | f305d3a224827814d56a4a328b01fcee9daa7d01 (diff) | |
download | coreutils-290ba4ab1d157acc459991ae2a77a18cc96ffe07.tar.xz |
(canonicalize_fname): Remove unneeded proxy function.
(can_mode): Make variable local.
-rw-r--r-- | src/readlink.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/readlink.c b/src/readlink.c index a99ab32c8..727016630 100644 --- a/src/readlink.c +++ b/src/readlink.c @@ -43,9 +43,6 @@ static bool no_newline; /* If true, report error messages. */ static bool verbose; -/* If not -1, use this method to canonicalize. */ -int can_mode = -1; - static struct option const longopts[] = { {"canonicalize", no_argument, 0, 'f'}, @@ -93,17 +90,18 @@ usage (int status) exit (status); } -static char * -canonicalize_fname (const char *fname) -{ - return canonicalize_filename_mode (fname, can_mode); -} - int main (int argc, char *const argv[]) { + /* If not -1, use this method to canonicalize. */ + int can_mode = -1; + + /* File name to canonicalize. */ const char *fname; + + /* Result of canonicalize. */ char *value; + int optc; initialize_main (&argc, &argv); @@ -161,7 +159,7 @@ main (int argc, char *const argv[]) } value = (can_mode != -1 - ? canonicalize_fname (fname) + ? canonicalize_filename_mode (fname, can_mode) : xreadlink (fname, 1024)); if (value) { |