Chop newline at the end of adapter name.

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4138 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2006-09-03 13:05:26 +00:00
1 parent 3478493d21
commit a026e09bd5
1 file changed
+2 -1
+2 -1
View File
@@ -199,7 +199,8 @@ int sensors_read_sysfs_bus(void)
if (!(attr = sysfs_get_device_attr(dev, "name")))
continue;
entry.adapter = strdup(attr->value);
/* NB: attr->value[attr->len-1] == '\n'; chop that off */
entry.adapter = strndup(attr->value, attr->len - 1);
if (!entry.adapter)
sensors_fatal_error(__FUNCTION__, "out of memory");