[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [BusyBox] [patch] Fix deallocvt to handle no arguments
From:       Erik Andersen <andersen () lineo ! com>
Date:       2000-09-22 0:40:53
[Download RAW message or body]

On Thu Sep 21, 2000 at 02:55:25PM -0700, Jon McClintock wrote:
> Hello,
> 
> BusyBox's deallocvt has code for handling no arguments, but the usage checking
> code aborts if there are any other than two arguments. This patch fixes
> that:
> 
> --- deallocvt.c.orig    Thu Sep 21 14:15:07 2000
> +++ deallocvt.c Thu Sep 21 14:40:21 2000
> @@ -17,7 +17,7 @@
>  {
>         int fd, num, i;
> 
> -       if ((argc != 2) || (**(argv + 1) == '-'))
> +       if ((argc > 2) || ((argv == 2) && (**(argv + 1) == '-')))
>                 usage(deallocvt_usage);
> 
>         fd = get_console_fd("/dev/console");
> 
> 
> If you think my conditional is ugly, feel free to replace it with a pretty one.

Looks fine to me.  Applied,

 -Erik

--
Erik B. Andersen   email:  andersen@lineo.com
--This message was written using 73% post-consumer electrons--



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic