Re: [PATCH] a few small mconf improvements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Sun, 7 May 2006, Jesper Juhl wrote:

>  - rename main() arguments from "ac"/"av" to the more common "argc"/"argv".

conf.c and qconf.cc do the same, it's a personal preference.

>  - when unlinking lxdialog.scrltmp, the return value of unlink() is not 
>    checked. The patch adds a check of the return value and bails out if 
>    unlink() fails for any reason other than ENOENT.

The check is not needed, the worst that can happen is a misbehaving 
lxdialog and you certainly have bigger problems than this, if the unlink
should fail. In the long term this should go away anyway.

>  - if the sscanf() call in conf() fails and stat==0 && type=='t', then 
>    we'll end up dereferencing a NULL 'sym' in sym_is_choice(). The patch 
>    adds a NULL check of 'sym' to that path and bails out with a big fat 
>    error message if that should ever happen (better than just crashing 
>    IMHO).

That error message is as useful to the normal user as a segfault - mconf 
doesn't work. Since it shouldn't happen, this check adds no real value, 
the user still has to provide enough information to reproduce the problem 
and at this point it makes no difference, whether I get this message or I 
see where it stops with gdb.

bye, Roman
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux