aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2019-09-12 17:40:28 +0200
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2019-09-19 03:45:55 +0200
commitb1b11094aa18378be8b9013db28b891e2a20fd59 (patch)
treed6fedd4a5c680cc8de8a2cc7d6d0d7c90452354e
parentfd8ff5abd5c1b1394c81bf472d726940c1c893cf (diff)
downloadhardware_replicant_libsamsung-ipc-b1b11094aa18378be8b9013db28b891e2a20fd59.tar.gz
hardware_replicant_libsamsung-ipc-b1b11094aa18378be8b9013db28b891e2a20fd59.tar.bz2
hardware_replicant_libsamsung-ipc-b1b11094aa18378be8b9013db28b891e2a20fd59.zip
devices: fix strncmp use
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 <GNUtoo@cyberdimension.org>
-rw-r--r--samsung-ipc/ipc.c2
1 files changed, 1 insertions, 1 deletions
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;