mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jesper Juhl" <jesper.juhl@gmail.com>
To: "Roman Zippel" <zippel@linux-m68k.org>
Cc: linux-kernel@vger.kernel.org, "Petr Baudis" <pasky@ucw.cz>,
	"Arnaldo Carvalho de Melo" <acme@conectiva.com.br>,
	"Sam Ravnborg" <sam@ravnborg.org>
Subject: Re: [PATCH] a few small mconf improvements
Date: Sat, 13 May 2006 22:59:21 +0200	[thread overview]
Message-ID: <9a8748490605131359h18f47e89o1f8545269fbf3502@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0605082337280.32445@scrub.home>

On 09/05/06, Roman Zippel <zippel@linux-m68k.org> wrote:
>
>
> 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.
>
Fair enough.


> >  - 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.
>
Ok, your call.


> >  - 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.
>
I disagree a little here. It may not really matter to you if you get a
report of a crash or if you get a report that mconf spewed an error
message, but to the user who experiences it (should it ever happen)
there's a difference - it's either "the damn thing crashed on me, what
a piece of crap" or "the damn thing crashed on me, but at least it
told me something went wrong, so now I can report it"... Printing an
error and exiting cleanly is IMHO always preferable to a crash - users
respond better to that and it's the "right" thing to do.

What about the other bits of the patch? are those OK?
Want me to send an updated patch - or?


-- 
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please      http://www.expita.com/nomime.html

  reply	other threads:[~2006-05-13 20:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-07 15:49 Jesper Juhl
2006-05-08 22:06 ` Roman Zippel
2006-05-13 20:59   ` Jesper Juhl [this message]
2006-05-27 23:50     ` Roman Zippel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9a8748490605131359h18f47e89o1f8545269fbf3502@mail.gmail.com \
    --to=jesper.juhl@gmail.com \
    --cc=acme@conectiva.com.br \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pasky@ucw.cz \
    --cc=sam@ravnborg.org \
    --cc=zippel@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®