Here the code tries to match for "Hardware", and strncmp returns
0 if there is a match, not 8.

Signed-off-by: Denis 'GNUtoo' Carikli <[email protected]>
---
 samsung-ipc/ipc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/samsung-ipc/ipc.c b/samsung-ipc/ipc.c
index 99a585a..f7e0379 100644
--- a/samsung-ipc/ipc.c
+++ b/samsung-ipc/ipc.c
@@ -74,7 +74,7 @@ int ipc_device_detect(void)
 
     line = strtok(buffer, "\n");
     while (line != NULL) {
-        if (strncmp(line, "Hardware", 8) == 8) {
+        if (strncmp(line, "Hardware", 8) == 0) {
             p = line + 11;
             c = p;
 
-- 
2.23.0

_______________________________________________
Replicant mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/replicant

Reply via email to