]> granicus.if.org Git - graphviz/commitdiff
lib/sparse: remove some unnecessary casts
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 17 Sep 2021 00:55:49 +0000 (17:55 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 20 Sep 2021 00:24:30 +0000 (17:24 -0700)
lib/sparse/general.c

index 048cd3a8c056a785b516c2d55b6996d858397c04..2ee45fbe9ee8a28a6595a38e63f1f05929feaa7e 100644 (file)
@@ -98,9 +98,8 @@ void vector_float_take(int n, float *v, int m, int *p, float **u){
 }
 
 static int comp_ascend(const void *s1, const void *s2){
-  const real *ss1, *ss2;
-  ss1 = (const real*) s1;
-  ss2 = (const real*) s2;
+  const real *ss1 = s1;
+  const real *ss2 = s2;
 
   if ((ss1)[0] > (ss2)[0]){
     return 1;
@@ -111,9 +110,8 @@ static int comp_ascend(const void *s1, const void *s2){
 }
 
 static int comp_ascend_int(const void *s1, const void *s2){
-  const int *ss1, *ss2;
-  ss1 = (const int*) s1;
-  ss2 = (const int*) s2;
+  const int *ss1 = s1;
+  const int *ss2 = s2;
 
   if ((ss1)[0] > (ss2)[0]){
     return 1;