From: "Giacomo A. Catenazzi" <cate@cateee.net>
To: Ladislav Michl <ladis@linux-mips.org>
Cc: linux-kbuild@vger.kernel.org
Subject: Re: [PATCH] conf.c: use return to exit from main()
Date: Fri, 31 Oct 2008 13:34:11 +0100 [thread overview]
Message-ID: <490AFB43.30504@cateee.net> (raw)
In-Reply-To: <20081031110905.GA20416@michl.2n.cz>
Ladislav Michl wrote:
> Replace exit() with return and use standard exit values. Good for
> code size and readability, although I have to admit both has very
> little impact on real world... :-)
>
> text data bss dec hex filename
> 60608 2084 5908 68600 10bf8 scripts/kconfig/conf_orig
> 60528 2084 5908 68520 10ba8 scripts/kconfig/conf
replacing return is ok, but it is wrong to change the return values:
We are on POSIX (UNIX, Linux, etc), not on a very generic standard C
implementation. The return value is important and it could be
used by other scripts, which is not guarantee in generic standard C.
With your change, it is more difficult to add other errors and to test
error values, because AFAIK the EXIT_FAILURE is not fix.
For these two reason, and because I don't think this program
could be ported in a generic C platform, I think you should
not uset EXIT_FAILURE.
ciao
cate
next prev parent reply other threads:[~2008-10-31 12:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-31 11:09 [PATCH] conf.c: use return to exit from main() Ladislav Michl
2008-10-31 12:34 ` Giacomo A. Catenazzi [this message]
2008-10-31 13:03 ` Ladislav Michl
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=490AFB43.30504@cateee.net \
--to=cate@cateee.net \
--cc=ladis@linux-mips.org \
--cc=linux-kbuild@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.