Skip to content
Commit 7e2a1083 authored by Julia Lawall's avatar Julia Lawall Committed by Jiri Kosina
Browse files

fs/qnx4: decrement sizeof size in strncmp

As an identical match is wanted in this case, strcmp can be used instead.

The semantic match that lead to detecting this problem is as follows:
(http://coccinelle.lip6.fr/

)

// <smpl>
@@
expression foo;
constant char *abc;
@@

*strncmp(foo, abc, sizeof(abc))
// </smpl>

Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
Signed-off-by: default avatarAnders Larsen <al@alarsen.net>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent fe9a2302
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment