-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Hello,
I have a question about the following code,
Lines 68 to 70 in 7655f5a
| if (strncmp((char *)a, ((struct sysfs_class_device *)b)->name, | |
| strlen((char *)a)) == 0) | |
| return 1; |
In the code, it will compare input with target using the length of input, but if input is something like host1 and there is already a node with name host12, it will mistakenly returns host12.
So my question is why not using strcmp? Thank you.
Best,
Jiatong Shen
Metadata
Metadata
Assignees
Labels
No labels