From 2dc799bccdca00f0f2da2727ee22d1c3f6f563ce Mon Sep 17 00:00:00 2001 From: "Jose A. Rivera" Date: Mon, 3 Mar 2014 11:49:55 +0530 Subject: lib/popt: Small whitespace fix for readability. Change-Id: Ib920f7e84c0247a8f09aa4c79c65b26afb78f234 Signed-off-by: Jose A. Rivera Reviewed-by: Jeremy Allison Reviewed-by: Ira Cooper --- lib/popt/popthelp.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'lib/popt') 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@*/ -- cgit