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

« back to all changes in this revision

Viewing changes to src/libs/zbxsysinfo/osf/sensors.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Ablassmeier
  • Date: 2007-07-02 09:06:51 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070702090651-8l6fl3fjw9rh6l2u
Tags: 1:1.4.1-2
Add patch from SVN in order to fix Incorrect processing of character '%'
in user parameters and remote commands.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18
18
**/
19
19
 
20
 
#include "config.h"
21
 
 
22
20
#include "common.h"
 
21
 
23
22
#include "sysinfo.h"
24
23
 
25
24
#include "md5.h"
53
52
 
54
53
                if(stat(filename,&buf)==0)
55
54
                {
56
 
                        f=fopen(filename,"r");
57
 
                        if(f==NULL)
 
55
                        if(NULL == (f = fopen(filename,"r") ))
58
56
                        {
59
57
                                continue;
60
58
                        }
61
59
                        fgets(line,MAX_STRING_LEN,f);
62
 
                        fclose(f);
 
60
                        zbx_fclose(f);
63
61
 
64
62
                        if(sscanf(line,"%lf\t%lf\t%lf\n",&d1, &d2, &d3) == 3)
65
63
                        {