mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-01-27 17:18:33 +00:00
Fix invalid call to close().
This commit is contained in:
parent
fbf746e53c
commit
f10ffe07c4
@ -2148,7 +2148,7 @@ static struct text_object *construct_text_object(const char *s,
|
|||||||
obj->type = OBJ_text;
|
obj->type = OBJ_text;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
DBGP("parsed platform args: '%s' '%s' %d %f %f\n", buf1, buf2, n, factor, offset);
|
DBGP("parsed platform args: '%s' '%s' %d %f %f", buf1, buf2, n, factor, offset);
|
||||||
obj->data.sysfs.fd = open_platform_sensor((*buf1) ? buf1 : 0, buf2, n,
|
obj->data.sysfs.fd = open_platform_sensor((*buf1) ? buf1 : 0, buf2, n,
|
||||||
&obj->data.sysfs.arg, obj->data.sysfs.devtype);
|
&obj->data.sysfs.arg, obj->data.sysfs.devtype);
|
||||||
strncpy(obj->data.sysfs.type, buf2, 63);
|
strncpy(obj->data.sysfs.type, buf2, 63);
|
||||||
|
@ -929,9 +929,8 @@ int open_sysfs_sensor(const char *dir, const char *dev, const char *type, int n,
|
|||||||
divbuf[divn] = '\0';
|
divbuf[divn] = '\0';
|
||||||
*divisor = atoi(divbuf);
|
*divisor = atoi(divbuf);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
close(divfd);
|
close(divfd);
|
||||||
|
}
|
||||||
|
|
||||||
return fd;
|
return fd;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user