Browse Source

Vlib: add comment to qsort cmp fn (see https://trac.osgeo.org/grass/ticket/3564)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@73140 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 6 years ago
parent
commit
caf1a33971
1 changed files with 3 additions and 1 deletions
  1. 3 1
      lib/vector/Vlib/break_lines.c

+ 3 - 1
lib/vector/Vlib/break_lines.c

@@ -110,7 +110,9 @@ static int cmp(const void *a, const void *b)
 {
     int ai = *(int *)a;
     int bi = *(int *)b;
-    
+
+    /* ai - bi is ok because ai and bi are positive integers
+     * -> no integer overflow */
     return (ai - bi);
 }