public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] prlimit: delete rem_prlim prototype
@ 2013-05-05 19:46 Davidlohr Bueso
  2013-05-06 17:29 ` Karel Zak
  0 siblings, 1 reply; 2+ messages in thread
From: Davidlohr Bueso @ 2013-05-05 19:46 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux

We can just move the function up before any of its callers.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
---
 sys-utils/prlimit.c | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/sys-utils/prlimit.c b/sys-utils/prlimit.c
index 9098e49..6d9ded2 100644
--- a/sys-utils/prlimit.c
+++ b/sys-utils/prlimit.c
@@ -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;
-- 
1.7.11.7




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] prlimit: delete rem_prlim prototype
  2013-05-05 19:46 [PATCH] prlimit: delete rem_prlim prototype Davidlohr Bueso
@ 2013-05-06 17:29 ` Karel Zak
  0 siblings, 0 replies; 2+ messages in thread
From: Karel Zak @ 2013-05-06 17:29 UTC (permalink / raw)
  To: Davidlohr Bueso; +Cc: util-linux

On Sun, May 05, 2013 at 12:46:51PM -0700, Davidlohr Bueso wrote:
>  sys-utils/prlimit.c | 20 ++++++++------------
>  1 file changed, 8 insertions(+), 12 deletions(-)

 Applied, thanks.

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-05-06 17:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-05 19:46 [PATCH] prlimit: delete rem_prlim prototype Davidlohr Bueso
2013-05-06 17:29 ` Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox