]> mj.ucw.cz Git - libucw.git/commitdiff
Opt: Deleted extra newlines after failure messages
authorMartin Mares <mj@ucw.cz>
Tue, 3 Sep 2013 13:43:07 +0000 (15:43 +0200)
committerMartin Mares <mj@ucw.cz>
Tue, 3 Sep 2013 13:43:07 +0000 (15:43 +0200)
ucw/opt.c

index 454fbd94eded1acc91129e78fde2b93374382b25..e2393ea0f8bc93cb82942698bb25f1f5ae55a3ea 100644 (file)
--- a/ucw/opt.c
+++ b/ucw/opt.c
@@ -545,16 +545,16 @@ void opt_parse(const struct opt_section * options, char ** argv) {
       continue;
     if (!pre->shortopt[i]->count && (pre->shortopt[i]->flags & OPT_REQUIRED))
       if (i < 256)
-        opt_failure("Required option -%c not found.\n", pre->shortopt[i]->item->letter);
+        opt_failure("Required option -%c not found.", pre->shortopt[i]->item->letter);
       else
-       opt_failure("Required positional argument #%d not found.\n", (i > 256) ? pre->shortopt[i]->item->letter-256 : opt_positional_max+1);
+       opt_failure("Required positional argument #%d not found.", (i > 256) ? pre->shortopt[i]->item->letter-256 : opt_positional_max+1);
   }
 
   for (int i=0;i<pre->opt_count;i++) {
     if (!pre->opts[i])
       continue;
     if (!pre->opts[i]->count && (pre->opts[i]->flags & OPT_REQUIRED))
-      opt_failure("Required option --%s not found.\n", pre->opts[i]->item->name);
+      opt_failure("Required option --%s not found.", pre->opts[i]->item->name);
   }
 }