1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2025-01-30 10:38:36 +00:00

Modify last commit to keep compiler happy since it claims devbuf can never be null (should we really trust gcc that much?)

This commit is contained in:
Cesare Tirabassi 2010-01-30 19:17:17 +01:00
parent ddec718a62
commit 80c56d099e

View File

@ -2305,13 +2305,11 @@ void update_diskio(void)
&& major != RAMDISK_MAJOR && major != LOOP_MAJOR) {
/* If the last character of the device is a digit we assume
* it is a subdevice (needed for kernel > 2.6.31) */
if (devbuf) {
len_devbuf = strlen(devbuf);
if ((len_devbuf > 0) && !isdigit(devbuf[len_devbuf-1])) {
total_reads += reads;
total_writes += writes;
}
}
} else {
col_count = sscanf(buf, "%u %u %s %*u %u %*u %u",
&major, &minor, devbuf, &reads, &writes);