Fix off-by-one bug in usage check.
authorTom Lane <[email protected]>
Tue, 3 Dec 2002 07:12:23 +0000 (07:12 +0000)
committerTom Lane <[email protected]>
Tue, 3 Dec 2002 07:12:23 +0000 (07:12 +0000)
contrib/vacuumlo/vacuumlo.c

index fb6844a2cfff234eed3619e7e8c3c7a184673b39..4087370554fde6881ba68479e87cafca9e6c8205 100644 (file)
@@ -471,7 +471,7 @@ main(int argc, char **argv)
        }
 
        /* No database given? Show usage */
-       if (optind >= argc - 1)
+       if (optind >= argc)
        {
                fprintf(stderr, "vacuumlo: missing required argument: database name\n");
                fprintf(stderr, "Try 'vacuumlo -?' for help.\n");