mirror of
https://github.com/vsergeev/c-periphery.git
synced 2026-08-20 21:28:32 +08:00
gpio: simplify dummy name and label getters in sysfs impl
This commit is contained in:
+6
-2
@@ -604,12 +604,16 @@ static int gpio_sysfs_fd(gpio_t *gpio) {
|
||||
}
|
||||
|
||||
static int gpio_sysfs_name(gpio_t *gpio, char *str, size_t len) {
|
||||
strncpy(str, "", len);
|
||||
if (len)
|
||||
str[0] = '\0';
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int gpio_sysfs_label(gpio_t *gpio, char *str, size_t len) {
|
||||
strncpy(str, "", len);
|
||||
if (len)
|
||||
str[0] = '\0';
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user