ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/libstatgrab/src/libstatgrab/tools.c
(Generate patch)

Comparing projects/libstatgrab/src/libstatgrab/tools.c (file contents):
Revision 1.57 by tdb, Mon Nov 1 18:30:17 2004 UTC vs.
Revision 1.58 by ats, Mon Nov 1 20:34:58 2004 UTC

# Line 544 | Line 544 | void *sg_realloc(void *ptr, size_t size) {
544          }
545          return tmp;
546   }
547
548 /* If we don't have a GNU compatible realloc, fake it. */
549 #if HAVE_REALLOC == 0
550 void *rpl_realloc(void *ptr, size_t size) {
551        if (ptr == NULL && size == 0) {
552                return NULL;
553        }
554
555        if (size == 0) {
556                free(ptr);
557                return NULL;
558        }
559
560        if (ptr == NULL) {
561                return malloc(size);
562        }
563
564 #undef realloc
565        return realloc(ptr, size);
566 #define realloc rpl_realloc
567 }
568 #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines