diff options
author | Jose A. Rivera <jarrpa@redhat.com> | 2014-03-03 11:49:55 +0530 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2014-03-13 21:45:12 +0100 |
commit | 2dc799bccdca00f0f2da2727ee22d1c3f6f563ce (patch) | |
tree | c9b9ae2c766a6e069992aac2857acb3f87e4d54f /lib | |
parent | 2b44c85c7b322b392c8d3d0f393171ca54bb5f47 (diff) | |
download | samba-2dc799bccdca00f0f2da2727ee22d1c3f6f563ce.tar.gz |
lib/popt: Small whitespace fix for readability.
Change-Id: Ib920f7e84c0247a8f09aa4c79c65b26afb78f234
Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/popt/popthelp.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/lib/popt/popthelp.c b/lib/popt/popthelp.c index e965ff6168e..0ed355a18d7 100644 --- a/lib/popt/popthelp.c +++ b/lib/popt/popthelp.c @@ -240,22 +240,23 @@ static void singleOptionHelp(FILE * fp, int maxLeftCol, /* Choose type of output */ /*@-branchstate@*/ if (opt->argInfo & POPT_ARGFLAG_SHOW_DEFAULT) { - defs = singleOptionDefaultValue(lineLength, opt, translation_domain); - if (defs) { - char * t = (char *)malloc((help ? strlen(help) : 0) + + defs = singleOptionDefaultValue(lineLength, opt, translation_domain); + if (defs) { + char * t = (char *)malloc((help ? strlen(help) : 0) + strlen(defs) + sizeof(" ")); - if (t) { - char * te = t; - *te = '\0'; - if (help) { - strcpy(te, help); te += strlen(te); - } - *te++ = ' '; - strcpy(te, defs); - defs = (char *)_free(defs); + if (t) { + char * te = t; + *te = '\0'; + if (help) { + strcpy(te, help); + te += strlen(te); + } + *te++ = ' '; + strcpy(te, defs); + defs = (char *)_free(defs); + } + defs = t; } - defs = t; - } } /*@=branchstate@*/ |