Changeset a28549 in git for omalloc/omInline.h
- Timestamp:
- Apr 28, 2006, 5:17:26 PM (17 years ago)
- Branches:
- (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
- Children:
- 521be7bb9621d5c752e9948ebdafd9fdd8ad38be
- Parents:
- 20722e405aa8f76d1fde4dd5a2a01cbcfb1e09bc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
omalloc/omInline.h
r20722e4 ra28549 5 5 * Author: obachman@mathematik.uni-kl.de (Olaf Bachmann) 6 6 * Created: 11/99 7 * Version: $Id: omInline.h,v 1. 8 2001-04-30 09:02:07Singular Exp $7 * Version: $Id: omInline.h,v 1.9 2006-04-28 15:17:26 Singular Exp $ 8 8 *******************************************************************/ 9 9 #if defined(OM_INLINE) || defined(OM_ALLOC_C) … … 34 34 { 35 35 unsigned long shift = omGetPageShiftOfAddr(addr); 36 return ((om_BinPageIndicies[index - om_MinBinPageIndex] & (((unsigned long) 1) << shift)) != 0 );36 return ((om_BinPageIndicies[index - om_MinBinPageIndex] & (((unsigned long) 1) << shift)) != 0L); 37 37 } 38 38 return 0; … … 154 154 { 155 155 void* r; 156 size_t i= 0;156 size_t i=(size_t)0; 157 157 158 158 while (s[i]) i++; … … 184 184 { 185 185 void* addr; 186 if (! size) size = 1;186 if (! size) size = (size_t)1; 187 187 __omTypeAllocAligned(void*, addr,size); 188 188 return addr; … … 192 192 { 193 193 void* addr; 194 if (! size) size = 1;194 if (! size) size = (size_t)1; 195 195 __omTypeAlloc0Aligned(void*,addr, size); 196 196 return addr; … … 201 201 void* new_addr; 202 202 203 if (!new_size) new_size = 1;203 if (!new_size) new_size = (size_t)1; 204 204 if (addr != NULL) 205 205 { … … 217 217 void* new_addr; 218 218 219 if (!new_size) new_size = 1;220 if (addr != NULL && old_size > 0)219 if (!new_size) new_size = (size_t)1; 220 if (addr != NULL && old_size > ((size_t)0)) 221 221 { 222 222 __omTypeRealloc0AlignedSize(addr, old_size, void* , new_addr, new_size); … … 233 233 void* new_addr; 234 234 235 if (!size) size = 1;235 if (!size) size = (size_t)1; 236 236 if (addr != NULL) 237 237 { … … 249 249 void* new_addr; 250 250 251 if (!size) size = 1;251 if (!size) size = (size_t)1; 252 252 if (addr != NULL) 253 253 {
Note: See TracChangeset
for help on using the changeset viewer.