On Jan 4, 2011, at 10:12 AM, Giorgos Keramidas wrote:
> On Tue, 4 Jan 2011 08:58:48 -0800, Garrett Cooper wrote:
> + errno = 0;
> + res = strtol(str, &endp, 10);
> + if (errno != 0 || endp == str || *endp != '\0')
> + err(1, "%s shall be a number", errname);
Sma
On Tue, 4 Jan 2011 08:58:48 -0800, Garrett Cooper wrote:
+ errno = 0;
+ res = strtol(str, &endp, 10);
+ if (errno != 0 || endp == str || *endp != '\0')
+ err(1, "%s shall be a number", errname);
>>>
>>> Small nit, maybe use 'must' instead of 'shall'.
>>
>> it seems
On Jan 4, 2011, at 5:49 AM, Alexander Best wrote:
> On Tue Jan 4 11, John Baldwin wrote:
>> On Tuesday, January 04, 2011 6:25:02 am Kostik Belousov wrote:
>>> On Tue, Jan 04, 2011 at 11:40:45AM +0100, Giorgos Keramidas wrote:
>>> @@ -123,12 +121,28 @@ main(argc, argv)
>>> }
>>>
On Tue Jan 4 11, John Baldwin wrote:
> On Tuesday, January 04, 2011 6:25:02 am Kostik Belousov wrote:
> > On Tue, Jan 04, 2011 at 11:40:45AM +0100, Giorgos Keramidas wrote:
> > @@ -123,12 +121,28 @@ main(argc, argv)
> > }
> > exit(0);
> > }
> > - exit (1);
> > + exi
On Tuesday, January 04, 2011 6:25:02 am Kostik Belousov wrote:
> On Tue, Jan 04, 2011 at 11:40:45AM +0100, Giorgos Keramidas wrote:
> @@ -123,12 +121,28 @@ main(argc, argv)
> }
> exit(0);
> }
> - exit (1);
> + exit(1);
> +}
> +
> +static int
> +parseint(con
On Tue, 4 Jan 2011 13:25:02 +0200, Kostik Belousov wrote:
>On Tue, Jan 04, 2011 at 11:40:45AM +0100, Giorgos Keramidas wrote:
>>On Tue, 04 Jan 2011 11:36:38 +0100, Giorgos Keramidas
>>wrote:
>>> Since the pattern of converting strings to int-derivative values appears
>>> multiple times, I'd prob
On Tue, Jan 04, 2011 at 11:40:45AM +0100, Giorgos Keramidas wrote:
> On Tue, 04 Jan 2011 11:36:38 +0100, Giorgos Keramidas
> wrote:
> > On Sun, 2 Jan 2011 18:46:47 -0500, Eitan Adler wrote:
> >> What about this patch? I incorporated your feedback so I am not going
> >> to reply inline.
> >
> >
On Tue, 04 Jan 2011 11:36:38 +0100, Giorgos Keramidas
wrote:
> On Sun, 2 Jan 2011 18:46:47 -0500, Eitan Adler wrote:
>> What about this patch? I incorporated your feedback so I am not going
>> to reply inline.
>
> Since the pattern of converting strings to int-derivative values appears
> multip
On Sun, 2 Jan 2011 18:46:47 -0500, Eitan Adler wrote:
> What about this patch? I incorporated your feedback so I am not going
> to reply inline.
Since the pattern of converting strings to int-derivative values appears
multiple times, I'd probably prefer something like a new function that
does th
On Sun, Jan 02, 2011 at 06:46:47PM -0500, Eitan Adler wrote:
> What about this patch? I incorporated your feedback so I am not going
> to reply inline.
>
> > The syntax of the prio commands is weird, there is an obvious corner
> > (or wrongly handled) case, where the command name starts with a di
What about this patch? I incorporated your feedback so I am not going
to reply inline.
> The syntax of the prio commands is weird, there is an obvious corner
> (or wrongly handled) case, where the command name starts with a digit.
> Command name starting with dash is even harder.
>
I agree - and
On Sun, 2 Jan 2011 12:18:45 +0200, Kostik Belousov wrote:
> On Sun, Jan 02, 2011 at 02:41:10AM -0500, Eitan Adler wrote:
>> > Just set the second argument to strtol to something non-NULL and then check
>> > the value returned; that will help provide the error handling with
>> > simplicity that you
On Sun, Jan 02, 2011 at 02:41:10AM -0500, Eitan Adler wrote:
> > Just set the second argument to strtol to something non-NULL and then check
> > the value returned; that will help provide the error handling with
> > simplicity that you desire :).
>
> How about this version? It also corrects a copy
> Just set the second argument to strtol to something non-NULL and then check
> the value returned; that will help provide the error handling with
> simplicity that you desire :).
How about this version? It also corrects a copy/paste error I have above
Index: rtprio.c
When looking at the rtprio(1) source I noticed that the dg in revision
3291 has indicated that he wanted to check to ensure that the user
provided priority was numeric. Also the man page for atoi says the
function is deprecated - so I replaced those functions as well.
Index: rtprio.c
=
15 matches
Mail list logo