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.35 by tdb, Sun Apr 4 22:48:50 2004 UTC vs.
Revision 1.36 by ats, Sun Apr 4 23:48:26 2004 UTC

# Line 451 | Line 451 | struct uvmexp *get_uvmexp() {
451          int mib[2];
452          size_t size;
453          static struct uvmexp *uvm = NULL;
454 +        struct uvmexp *new;
455  
456          mib[0] = CTL_VM;
457          mib[1] = VM_UVMEXP;
# Line 459 | Line 460 | struct uvmexp *get_uvmexp() {
460                  return NULL;
461          }
462  
463 <        uvm = realloc(uvm, size);
464 <        if (uvm == NULL) {
463 >        new = realloc(uvm, size);
464 >        if (new == NULL) {
465                  return NULL;
466          }
467 +        uvm = new;
468  
469          if (sysctl(mib, 2, uvm, &size, NULL, 0) < 0) {
470                  return NULL;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines