]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
prlimit: delete rem_prlim prototype
authorDavidlohr Bueso <davidlohr.bueso@hp.com>
Sun, 5 May 2013 19:46:51 +0000 (12:46 -0700)
committerKarel Zak <kzak@redhat.com>
Mon, 6 May 2013 17:27:03 +0000 (19:27 +0200)
We can just move the function up before any of its callers.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
sys-utils/prlimit.c

index 9098e49760fd6fefc1ff5a2090ce8f964ebe8e7a..6d9ded223d07f9d42ed009c04ec6894fadeee051 100644 (file)
@@ -144,8 +144,6 @@ static int prlimit(pid_t p, int resource,
 }
 #endif
 
-static void rem_prlim(struct prlimit *lim);
-
 static void __attribute__ ((__noreturn__)) usage(FILE * out)
 {
        size_t i;
@@ -273,6 +271,14 @@ static int column_name_to_id(const char *name, size_t namesz)
        return -1;
 }
 
+static void rem_prlim(struct prlimit *lim)
+{
+       if (!lim)
+               return;
+       list_del(&lim->lims);
+       free(lim);
+}
+
 static int show_limits(struct list_head *lims, int tt_flags)
 {
        int i;
@@ -372,8 +378,6 @@ static void do_prlimit(struct list_head *lims)
        }
 }
 
-
-
 static int get_range(char *str, rlim_t *soft, rlim_t *hard, int *found)
 {
        char *end = NULL;
@@ -466,14 +470,6 @@ static int add_prlim(char *ops, struct list_head *lims, size_t id)
        return 0;
 }
 
-static void rem_prlim(struct prlimit *lim)
-{
-       if (!lim)
-               return;
-       list_del(&lim->lims);
-       free(lim);
-}
-
 int main(int argc, char **argv)
 {
        int opt, tt_flags = 0;