Re: [PATCH] conf.c: use return to exit from main()

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

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux