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

Comparing projects/libstatgrab/src/libstatgrab/user_stats.c (file contents):
Revision 1.3 by tdb, Fri Feb 28 22:59:35 2003 UTC vs.
Revision 1.4 by pajs, Sat Mar 1 02:38:22 2003 UTC

# Line 41 | Line 41 | user_stat_t *get_user_stats(){
41  
42          /* First case call */
43          if (watermark==-1){
44 <                user_stat.name_list=malloc(START_VAL * sizeof *user_stat.name_list);
44 >                user_stat.name_list=malloc(START_VAL * sizeof(user_stat.name_list));
45                  if(user_stat.name_list==NULL){
46                          return NULL;
47                  }
# Line 53 | Line 53 | user_stat_t *get_user_stats(){
53                  if(entry->ut_type==USER_PROCESS) {
54                          if(num_users>watermark-1){
55                                  name_ptr=user_stat.name_list;
56 <                                if((user_stat.name_list=realloc(user_stat.name_list, (watermark*2* sizeof *user_stat.name_list)))==NULL){
56 >                                if((user_stat.name_list=realloc(user_stat.name_list, (watermark*2* sizeof(user_stat.name_list))))==NULL){
57                                          user_stat.name_list=name_ptr;
58                                          return NULL;
59                                  }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines