Browse Source

v.random: simplify code (cosmetics)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@44721 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 14 years ago
parent
commit
9743724879
1 changed files with 2 additions and 4 deletions
  1. 2 4
      vector/v.random/main.c

+ 2 - 4
vector/v.random/main.c

@@ -156,10 +156,8 @@ int main(int argc, char *argv[])
 	G_fatal_error(_("Number of points must be > 0 (%d given)"), n);
     }
 
-    if (flag.z->answer)
-	Vect_open_new(&Out, output, WITH_Z);
-    else
-	Vect_open_new(&Out, output, WITHOUT_Z);
+    /* create new vector map */
+    Vect_open_new(&Out, output, flag.z->answer ? WITH_Z : WITHOUT_Z);
 
     /* Do we need to write random values into attribute table? */
     if (parm.zcol->answer) {