diff --git a/lib/sysfs_hba.c b/lib/sysfs_hba.c index 5cb7fd3..7862154 100644 --- a/lib/sysfs_hba.c +++ b/lib/sysfs_hba.c @@ -606,7 +606,7 @@ static int get_ctlr_num(const char *netdev) if (!ctlr) continue; - ctlr_num = atoi(&ctlr[strlen(ctlr) - 1]); + ctlr_num = atoi(&ctlr[sizeof("ctlr_") - 1]); break; }