소스 검색

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 년 전
부모
커밋
caf1a33971
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  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);
 }