]> granicus.if.org Git - postgis/commitdiff
Fix bracket issue in commandline opt handline
authorPaul Ramsey <pramsey@cleverelephant.ca>
Sun, 20 Dec 2009 04:31:06 +0000 (04:31 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Sun, 20 Dec 2009 04:31:06 +0000 (04:31 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@5036 b70326c6-7e19-0410-871a-916f4a2858ee

loader/shp2pgsql-cli.c

index 3d4f14983d1d6a83f6476d6b8a114270c7f2a6ce..c924b836ffcb99b70fcb18ed87fb7e1b78b0c3a3 100644 (file)
@@ -77,11 +77,15 @@ main (int argc, char **argv)
                        case 'a':
                        case 'p':
                                if (config->opt == ' ')
+                               {
                                        config->opt = c;
+                               }
                                else
+                               {
                                        /* Only one of these options can be chosen */
                                        usage();
                                        exit(0);
+                               }
                                break;
 
                        case 'D':
@@ -94,11 +98,15 @@ main (int argc, char **argv)
 
                        case 's':
                                if (optarg) 
+                               {
                                        sscanf(optarg, "%d", &(config->sr_id));
+                               }
                                else 
+                               {
                                        /* With -s, user must specify SRID */
                                        usage();
                                        exit(0);
+                               }
                                break;
 
                        case 'g':