]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
docs: fix line length bug in gen.pl
authorEmil Engler <me@emilengler.com>
Mon, 11 Jan 2021 19:27:58 +0000 (20:27 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 12 Jan 2021 07:06:54 +0000 (08:06 +0100)
The script warns if the length of $opt and $desc is > 78. However, these
two variables are on totally separate lines so the check makes no sense.
Also the $bitmask field is totally forgotten. Currently this leads to
two warnings within `--resolve` and `--aws-sigv4`.

Closes #6438

docs/cmdline-opts/gen.pl

index ff358514a1de8ebcc883d4510fcc2b131eee30d1..1cd4a050ec5b11a688a3f8d1b5e7512167642526 100755 (executable)
@@ -369,8 +369,11 @@ sub listhelp {
 
         my $line = sprintf "  {\"%s\",\n   \"%s\",\n   %s},\n", $opt, $desc, $bitmask;
 
-        if(length($opt) + length($desc) > 78) {
-            print STDERR "WARN: the --$long line is too long\n";
+        if(length($opt) > 78) {
+            print STDERR "WARN: the --$long name is too long\n";
+        }
+        else if(length($desc) > 78) {
+            print STDERR "WARN: the --$long description is too long\n";
         }
         print $line;
     }