summaryrefslogtreecommitdiffstats
path: root/lib/popt
diff options
context:
space:
mode:
authorJose A. Rivera <jarrpa@redhat.com>2014-03-03 11:49:55 +0530
committerJeremy Allison <jra@samba.org>2014-03-13 21:45:12 +0100
commit2dc799bccdca00f0f2da2727ee22d1c3f6f563ce (patch)
treec9b9ae2c766a6e069992aac2857acb3f87e4d54f /lib/popt
parent2b44c85c7b322b392c8d3d0f393171ca54bb5f47 (diff)
downloadsamba-2dc799bccdca00f0f2da2727ee22d1c3f6f563ce.tar.gz
samba-2dc799bccdca00f0f2da2727ee22d1c3f6f563ce.tar.xz
samba-2dc799bccdca00f0f2da2727ee22d1c3f6f563ce.zip
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/popt')
-rw-r--r--lib/popt/popthelp.c29
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@*/