util/find-doc-nits: check podchecker() return value
authorRichard Levitte <levitte@openssl.org>
Sun, 15 Nov 2020 18:20:32 +0000 (19:20 +0100)
committerRichard Levitte <levitte@openssl.org>
Tue, 17 Nov 2020 22:12:02 +0000 (23:12 +0100)
From the Pod::Checker manual:

> RETURN VALUE
>        podchecker returns the number of POD syntax errors found or
>        -1 if there were no POD commands at all found in the file.

Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/13416)

util/find-doc-nits

index a581adfa35b0c5e5d94b90651116f9868b6fbfd1..c311d792f2d7c68c62797df7fcb7e87820207166 100755 (executable)
@@ -778,7 +778,8 @@ sub check {
 
     open my $OUT, '>', $temp
         or die "Can't open $temp, $!";
-    podchecker($filename, $OUT);
+    err($id, "POD errors")
+        if podchecker($filename, $OUT) != 0;
     close $OUT;
     open $OUT, '<', $temp
         or die "Can't read $temp, $!";