Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1513919
| From | Masahiro Yamada <yamada.masahiro@socionext.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 09/10] scripts/basic/fixdep: Complete error handling in print_cmdline() |
| Date | 2016-11-02 16:40 +0100 |
| Message-ID | <sz5NT-83X-11@gated-at.bofh.it> (permalink) |
| References | <sxaRH-5SO-5@gated-at.bofh.it> <sxb1n-5Wd-3@gated-at.bofh.it> <sxp4l-6yL-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
2016-10-29 8:42 GMT+09:00 Jim Davis <jim.epost@gmail.com>:
> On Fri, Oct 28, 2016 at 1:40 AM, SF Markus Elfring
> <elfring@users.sourceforge.net> wrote:
>
>> + if (printf("cmd_%s := %s\n\n", target, cmdline) < 10) {
>
> Rather than scatter fragile magic numbers, like 10, throughout the
> code, if you're hell-bent on checking for printf errors you could
> write a little wrapper function that hid the magic number and bundled
> up the errno stuff.
BTW, how the magic number "10" was calculated?
--
Best Regards
Masahiro Yamada
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/10] scripts/basic: Fine-tuning for seven function implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2016-10-28 10:40 +0200
[PATCH 08/10] scripts/basic/fixdep: Complete error handling in print_config() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-10-28 10:40 +0200
[PATCH 06/10] scripts/basic/fixdep: Complete error handling in do_config_file() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-10-28 10:40 +0200
[PATCH 05/10] scripts/basic/fixdep: Complete error handling in parse_dep_file() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-10-28 10:40 +0200
[PATCH 07/10] scripts/basic/fixdep: Fix error log output in do_config_file() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-10-28 10:40 +0200
[PATCH 03/10] scripts/basic/fixdep: Use the symbol "MAP_FAILED" in print_deps() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-10-28 10:40 +0200
[PATCH 01/10] scripts/basic/bin2c: Complete error handling in main() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-10-28 10:40 +0200
Re: [PATCH 01/10] scripts/basic/bin2c: Complete error handling in main() Jim Davis <jim.epost@gmail.com> - 2016-10-29 00:40 +0200
Re: [PATCH 01/10] scripts/basic/bin2c: Complete error handling in main() Masahiro Yamada <yamada.masahiro@socionext.com> - 2016-11-02 16:50 +0100
Re: scripts/basic/bin2c: Complete error handling in main() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-11-02 18:50 +0100
Re: scripts/basic/bin2c: Complete error handling in main() Masahiro Yamada <yamada.masahiro@socionext.com> - 2016-11-02 19:30 +0100
Re: scripts/basic/bin2c: Complete error handling in main() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-11-02 19:50 +0100
Re: scripts/basic/bin2c: Complete error handling in main() Michal Marek <mmarek@suse.com> - 2016-11-03 16:50 +0100
Re: scripts/basic/bin2c: Complete error handling in main() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-11-03 20:50 +0100
Re: scripts/basic/bin2c: Complete error handling in main() Michal Marek <mmarek@suse.com> - 2016-11-04 13:20 +0100
Re: scripts/basic/bin2c: Complete error handling in main() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-11-04 14:50 +0100
[PATCH 09/10] scripts/basic/fixdep: Complete error handling in print_cmdline() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-10-28 10:50 +0200
Re: [PATCH 09/10] scripts/basic/fixdep: Complete error handling in print_cmdline() Jim Davis <jim.epost@gmail.com> - 2016-10-29 01:50 +0200
Re: scripts/basic/fixdep: Complete error handling in print_cmdline() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-10-30 16:20 +0100
Re: [PATCH 09/10] scripts/basic/fixdep: Complete error handling in print_cmdline() Masahiro Yamada <yamada.masahiro@socionext.com> - 2016-11-02 16:40 +0100
Re: scripts/basic/fixdep: Complete error handling in print_cmdline() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-11-02 18:40 +0100
Re: scripts/basic/fixdep: Complete error handling in print_cmdline() Masahiro Yamada <yamada.masahiro@socionext.com> - 2016-11-02 19:40 +0100
Re: scripts/basic/fixdep: Complete error handling in print_cmdline() Michal Marek <mmarek@suse.com> - 2016-11-03 17:00 +0100
[PATCH 10/10] scripts/basic/fixdep: Combine two fprintf() calls into one fputs() call in usage() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-10-28 10:50 +0200
csiph-web