Changeset e1ab30f8 in mainline
- Timestamp:
- 2009-06-03T19:12:02Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d4a3ee5
- Parents:
- ee369f3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/generic/as.c
ree369f3 re1ab30f8 31 31 */ 32 32 /** @file 33 */ 33 */ 34 34 35 35 #include <as.h> … … 103 103 static size_t maxheapsize = (size_t) (-1); 104 104 105 static void * 105 static void *last_allocated = 0; 106 106 107 107 /* Start of heap linker symbol */ … … 120 120 121 121 /* Check for invalid values */ 122 if ( incr < 0 && -incr > heapsize)122 if ((incr < 0) && (((size_t) -incr) > heapsize)) 123 123 return NULL; 124 124 125 125 /* Check for too large value */ 126 if ( incr > 0 && incr+heapsize < heapsize)126 if ((incr > 0) && (incr + heapsize < heapsize)) 127 127 return NULL; 128 128 129 129 /* Check for too small values */ 130 if ( incr < 0 && incr+heapsize > heapsize)130 if ((incr < 0) && (incr + heapsize > heapsize)) 131 131 return NULL; 132 132 … … 176 176 177 177 /* Set heapsize to some meaningful value */ 178 if (maxheapsize == -1)178 if (maxheapsize == (size_t) -1) 179 179 set_maxheapsize(MAX_HEAP_SIZE); 180 180
Note:
See TracChangeset
for help on using the changeset viewer.