- Remove unnecessary warning from libbb and move bb_wfopen_input near bb_wfopen
[oweals/busybox.git] / coreutils / chown.c
index 02b752474ae332ae27961bfc93b767f5a6c63ed0..638745f1784f2a71c6af8711982d46724001e4c8 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * Mini chown implementation for busybox
  *
- * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -53,19 +53,6 @@ static int fileAction(const char *fileName, struct stat *statbuf, void* junk)
 #define FLAG_R 1
 #define FLAG_h 2
 
-static unsigned long get_ug_id(const char *s, long (*my_getxxnam)(const char *))
-{
-       unsigned long r;
-       char *p;
-
-       r = strtoul(s, &p, 10);
-       if (*p || (s == p)) {
-               r = my_getxxnam(s);
-       }
-
-       return r;
-}
-
 int chown_main(int argc, char **argv)
 {
        int flags;
@@ -97,10 +84,10 @@ int chown_main(int argc, char **argv)
        uid = get_ug_id(*argv, my_getpwnam);
 
        ++argv;
-       
+
        /* Ok, ready to do the deed now */
        do {
-               if (! recursive_action (*argv, (flags & FLAG_R), FALSE, FALSE, 
+               if (! recursive_action (*argv, (flags & FLAG_R), FALSE, FALSE,
                                                                fileAction, fileAction, NULL)) {
                        retval = EXIT_FAILURE;
                }