瀏覽代碼

v.to.db: Remove duplicate calls

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@68241 15284696-431f-4ddb-bdfa-cd5b030d7da7
Huidae Cho 9 年之前
父節點
當前提交
73dccbc761
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      vector/v.to.db/main.c

+ 1 - 1
vector/v.to.db/main.c

@@ -70,7 +70,7 @@ int main(int argc, char *argv[])
     /* allocate array for values */
     /* allocate array for values */
     /* (+ 1 is for cat -1 (no category) reported at the end ) */
     /* (+ 1 is for cat -1 (no category) reported at the end ) */
     findex = Vect_cidx_get_field_index(&Map, options.field);
     findex = Vect_cidx_get_field_index(&Map, options.field);
-    if (Vect_cidx_get_field_index(&Map, options.field) > -1) {
+    if (findex > -1) {
 	n = Vect_cidx_get_num_unique_cats_by_index(&Map, findex);
 	n = Vect_cidx_get_num_unique_cats_by_index(&Map, findex);
     }
     }
     else {
     else {