fs/qnx4: decrement sizeof size in strncmp
authorJulia Lawall <julia@diku.dk>
Thu, 12 Nov 2009 22:08:36 +0000 (23:08 +0100)
committerJiri Kosina <jkosina@suse.cz>
Thu, 4 Feb 2010 10:55:46 +0000 (11:55 +0100)
commit7e2a10836c0455cb3ca397f89b8280496148d571
tree26a00a1581727fb1177e509826bedd727b53a265
parentfe9a2302230fa287715a11a3d3aec74eec75a6a4
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: Julia Lawall <julia@diku.dk>
Signed-off-by: Anders Larsen <al@alarsen.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
fs/qnx4/inode.c