~ubuntu-dev/ubuntu/lucid/zabbix/lucid-201002110857

« back to all changes in this revision

Viewing changes to src/libs/zbxsysinfo/linux/proc.c

  • Committer: Bazaar Package Importer
  • Author(s): Stephan Hermann
  • Date: 2008-06-04 09:22:37 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20080604092237-zgwq7kmraj1oohoz
Tags: 1:1.4.5-1ubuntu1
* Merge from debian unstable, remaining changes: 
  + fixing missing pid directory in /var/run
* Added the same patch to debian/zabbix-server-{mysql,pgsql}.zabbix-server.init
  (LP: #172775)

Show diffs side-by-side

added added

removed removed

Lines of Context:
160
160
 
161
161
                        if(procname[0] != 0)
162
162
                        {
163
 
                                fgets(line,MAX_STRING_LEN,f);
 
163
                                if(NULL == fgets(line,MAX_STRING_LEN,f))
 
164
                                {
 
165
                                        continue;
 
166
                                }
164
167
                                if(sscanf(line,"%s\t%s\n",name1,name2)==2)
165
168
                                {
166
169
                                        if(strcmp(name1,"Name:") == 0)
449
452
                proc_ok = 0;
450
453
                if(procname[0] != 0)
451
454
                {
452
 
                    fgets(line,MAX_STRING_LEN,f);
 
455
                    if(NULL == fgets(line,MAX_STRING_LEN,f))
 
456
                        {
 
457
                                continue;
 
458
                        }
453
459
                    if(sscanf(line,"%s\t%s\n",name1,name2)==2)
454
460
                    {
455
461
                        if(strcmp(name1,"Name:") == 0)