[GRASS-SVN] r44955 - grass/trunk/lib/vector/diglib
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Jan 11 13:00:49 EST 2011
Author: mmetz
Date: 2011-01-11 10:00:49 -0800 (Tue, 11 Jan 2011)
New Revision: 44955
Modified:
grass/trunk/lib/vector/diglib/list.c
Log:
cosmetics
Modified: grass/trunk/lib/vector/diglib/list.c
===================================================================
--- grass/trunk/lib/vector/diglib/list.c 2011-01-11 18:00:00 UTC (rev 44954)
+++ grass/trunk/lib/vector/diglib/list.c 2011-01-11 18:00:49 UTC (rev 44955)
@@ -30,15 +30,13 @@
return 1;
}
-/* Init add item to list */
+/* Add item to list, does not check for duplicates */
int dig_list_add(struct ilist *list, int val)
{
- void *p;
- int size;
-
if (list->n_values == list->alloc_values) {
- size = (list->n_values + 1000) * sizeof(int);
- p = G_realloc((void *)list->value, size);
+ size_t size = (list->n_values + 1000) * sizeof(int);
+ void *p = G_realloc((void *)list->value, size);
+
if (p == NULL)
return 0;
list->value = (int *)p;
More information about the grass-commit
mailing list