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

Comparing projects/cms/source/ihost/libstatgrab/user_stats.c (file contents):
Revision 1.5 by pajs, Sun May 19 17:58:58 2002 UTC vs.
Revision 1.6 by pajs, Tue May 21 16:16:41 2002 UTC

# Line 80 | Line 80 | char *get_user_stats(){
80          }
81  
82   #endif
83 <        if (user_list==NULL) user_list=strdup("");
84 <        xml_user_data=strf("<users><list>%s</list><count>%d</count></users>",user_list,nousers);
83 >        if (user_list==NULL){
84 >                if((user_list=strdup("")) == NULL){
85 >                        errf("strdup failed (%m)");
86 >                        return NULL;
87 >                }
88 >        }
89 >        if((xml_user_data=strf("<users><list>%s</list><count>%d</count></users>",user_list,nousers)) == NULL){
90 >                errf("strf failed (%m)");
91 >                return NULL;
92 >        }
93          if (user_list!=NULL) free(user_list);
94          return xml_user_data;
95   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines