Pārlūkot izejas kodu

size_t: update vector diglib

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@52046 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 13 gadi atpakaļ
vecāks
revīzija
247c4a4869
1 mainītis faili ar 4 papildinājumiem un 4 dzēšanām
  1. 4 4
      lib/vector/diglib/allocation.c

+ 4 - 4
lib/vector/diglib/allocation.c

@@ -78,7 +78,7 @@ void *dig__alloc_space(int n_wanted, int *n_elements, int chunk_size, void *ptr,
 
 
     /*  first time called allocate initial storage  */
     /*  first time called allocate initial storage  */
     if (*n_elements == 0)
     if (*n_elements == 0)
-	ptr = G_calloc((unsigned)to_alloc, (unsigned)element_size);
+	ptr = G_calloc(to_alloc, element_size);
     else
     else
 	ptr = dig__frealloc((char *)ptr, to_alloc, element_size, *n_elements);
 	ptr = dig__frealloc((char *)ptr, to_alloc, element_size, *n_elements);
 
 
@@ -126,7 +126,7 @@ void *dig__falloc(int nelem, int elsize)
 	nelem = 1;
 	nelem = 1;
     }
     }
 
 
-    ptr = G_calloc((unsigned)nelem, (unsigned)elsize);
+    ptr = G_calloc(nelem, elsize);
     return (ptr);
     return (ptr);
 }
 }
 
 
@@ -141,7 +141,7 @@ void *dig__frealloc(void *oldptr, int nelem, int elsize, int oldnelem)
 	nelem = 1;
 	nelem = 1;
     }
     }
 
 
-    ptr = G_calloc((unsigned)nelem, (unsigned)elsize);
+    ptr = G_calloc(nelem, elsize);
 
 
     /*  out of memory  */
     /*  out of memory  */
     if (!ptr)
     if (!ptr)
@@ -150,7 +150,7 @@ void *dig__frealloc(void *oldptr, int nelem, int elsize, int oldnelem)
     {
     {
 	register char *a;
 	register char *a;
 	register char *b;
 	register char *b;
-	register long n;
+	register size_t n;
 
 
 	n = oldnelem * elsize;
 	n = oldnelem * elsize;
 	a = ptr;
 	a = ptr;