aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2019-09-12 17:34:58 +0200
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2019-09-12 17:35:00 +0200
commita748bf62012ba40671e719a6ebc5437006cd2c79 (patch)
treed6fedd4a5c680cc8de8a2cc7d6d0d7c90452354e
parentfd8ff5abd5c1b1394c81bf472d726940c1c893cf (diff)
downloadhardware_replicant_libsamsung-ipc-a748bf62012ba40671e719a6ebc5437006cd2c79.tar.gz
hardware_replicant_libsamsung-ipc-a748bf62012ba40671e719a6ebc5437006cd2c79.tar.bz2
hardware_replicant_libsamsung-ipc-a748bf62012ba40671e719a6ebc5437006cd2c79.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;