]> granicus.if.org Git - postgresql/commitdiff
pg_receivexlog: Fix logic error
authorPeter Eisentraut <peter_e@gmx.net>
Wed, 26 Jun 2013 03:50:14 +0000 (23:50 -0400)
committerPeter Eisentraut <peter_e@gmx.net>
Wed, 26 Jun 2013 04:02:01 +0000 (00:02 -0400)
The code checking the WAL file name contained a logic error and wouldn't
actually catch some bad names.

src/bin/pg_basebackup/pg_receivexlog.c

index 1850787784552de9b63aefd82deaa8b801edd7a2..787a3951bda3577208f05bdbbe9d9333a3634b45 100644 (file)
@@ -145,7 +145,7 @@ FindStreamingStart(uint32 *tli)
                 * characters.
                 */
                if (strlen(dirent->d_name) != 24 ||
-                       !strspn(dirent->d_name, "0123456789ABCDEF") == 24)
+                       strspn(dirent->d_name, "0123456789ABCDEF") != 24)
                        continue;
 
                /*