util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] prlimit: return proper type
@ 2011-12-08 20:19 Davidlohr Bueso
  2011-12-09  9:48 ` Voelker, Bernhard
  2011-12-16 10:31 ` Karel Zak
  0 siblings, 2 replies; 4+ messages in thread
From: Davidlohr Bueso @ 2011-12-08 20:19 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux

From: Davidlohr Bueso <dave@gnu.org>

The add_prlim() function's definition currently returns a bogus structure.

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

diff --git a/sys-utils/prlimit.c b/sys-utils/prlimit.c
index ae5453b..c785909 100644
--- a/sys-utils/prlimit.c
+++ b/sys-utils/prlimit.c
@@ -450,7 +450,7 @@ static int parse_prlim(struct rlimit *lim, char *ops, size_t id)
 	return found;
 }
 
-static struct prlimit *add_prlim(char *ops, struct list_head *lims, size_t id)
+static int add_prlim(char *ops, struct list_head *lims, size_t id)
 {
 	struct prlimit *lim = calloc(1, sizeof(*lim));
 
-- 
1.7.4.1

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

* RE: [PATCH] prlimit: return proper type
  2011-12-08 20:19 [PATCH] prlimit: return proper type Davidlohr Bueso
@ 2011-12-09  9:48 ` Voelker, Bernhard
  2011-12-09 13:13   ` Davidlohr Bueso
  2011-12-16 10:31 ` Karel Zak
  1 sibling, 1 reply; 4+ messages in thread
From: Voelker, Bernhard @ 2011-12-09  9:48 UTC (permalink / raw)
  To: dave@gnu.org, Karel Zak; +Cc: util-linux

Davidlohr Bueso wrote:

> The add_prlim() function's definition currently returns a bogus structure=
.

> -static struct prlimit *add_prlim(char *ops, struct list_head *lims, size=
_t id)
> +static int add_prlim(char *ops, struct list_head *lims, size_t id)

Why not void and remove that return stmt?
The return code is not used anywhere.

Have a nice day,
Berny=

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

* RE: [PATCH] prlimit: return proper type
  2011-12-09  9:48 ` Voelker, Bernhard
@ 2011-12-09 13:13   ` Davidlohr Bueso
  0 siblings, 0 replies; 4+ messages in thread
From: Davidlohr Bueso @ 2011-12-09 13:13 UTC (permalink / raw)
  To: Voelker, Bernhard; +Cc: Karel Zak, util-linux

I'd rather have the function return a proper status and not use it than
not return anything.

Thanks,
Davidlohr

On Fri, 2011-12-09 at 10:48 +0100, Voelker, Bernhard wrote:
> Davidlohr Bueso wrote:
> 
> > The add_prlim() function's definition currently returns a bogus structure.
> 
> > -static struct prlimit *add_prlim(char *ops, struct list_head *lims, size_t id)
> > +static int add_prlim(char *ops, struct list_head *lims, size_t id)
> 
> Why not void and remove that return stmt?
> The return code is not used anywhere.
> 
> Have a nice day,
> Berny



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

* Re: [PATCH] prlimit: return proper type
  2011-12-08 20:19 [PATCH] prlimit: return proper type Davidlohr Bueso
  2011-12-09  9:48 ` Voelker, Bernhard
@ 2011-12-16 10:31 ` Karel Zak
  1 sibling, 0 replies; 4+ messages in thread
From: Karel Zak @ 2011-12-16 10:31 UTC (permalink / raw)
  To: Davidlohr Bueso; +Cc: util-linux

On Thu, Dec 08, 2011 at 09:19:19PM +0100, Davidlohr Bueso wrote:
>  sys-utils/prlimit.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

 Applied, thanks.

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

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

end of thread, other threads:[~2011-12-16 10:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-08 20:19 [PATCH] prlimit: return proper type Davidlohr Bueso
2011-12-09  9:48 ` Voelker, Bernhard
2011-12-09 13:13   ` Davidlohr Bueso
2011-12-16 10:31 ` Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).