summaryrefslogtreecommitdiffhomepage
path: root/miscutils/i2c_tools.c
diff options
context:
space:
mode:
Diffstat (limited to 'miscutils/i2c_tools.c')
-rw-r--r--miscutils/i2c_tools.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/miscutils/i2c_tools.c b/miscutils/i2c_tools.c
index 90d1e1e14..03bb03974 100644
--- a/miscutils/i2c_tools.c
+++ b/miscutils/i2c_tools.c
@@ -1198,7 +1198,7 @@ static void NORETURN list_i2c_busses_and_exit(void)
if (subde->d_name[0] == '.')
continue;
- if (strncmp(subde->d_name, "i2c-", 4) == 0) {
+ if (is_prefixed_with(subde->d_name, "i2c-")) {
snprintf(path, NAME_MAX,
"%s/%s/device/%s/name",
i2cdev_path, de->d_name,
@@ -1229,7 +1229,7 @@ found:
if (rv != 1)
continue;
- if (strncmp(name, "ISA", 3) == 0)
+ if (is_prefixed_with(name, "ISA"))
adt = ADT_ISA;
else
adt = i2cdetect_get_funcs(bus);