]> git.baikalelectronics.ru Git - kernel.git/commit
tpm/tpm_ppi: Do not compare strcmp(a,b) == -1
authorPeter Huewe <PeterHuewe@gmx.de>
Wed, 30 Oct 2013 19:46:55 +0000 (20:46 +0100)
committerPeter Huewe <peterhuewe@gmx.de>
Mon, 6 Jan 2014 13:37:23 +0000 (14:37 +0100)
commit25efc400fc85417b79ec35b13ff91537d9648ea9
tree688429e581a2d74cab3ffce355030b6885c6accf
parentc548e1fa9eaf8ac3c629dbe72dc2714f0e7eb5e0
tpm/tpm_ppi: Do not compare strcmp(a,b) == -1

Depending on the implementation strcmp might return the difference between
two strings not only -1,0,1 consequently
 if (strcmp (a,b) == -1)
might lead to taking the wrong branch

-> compare with < 0  instead,
which in any case is more canonical.

Cc: stable@vger.kernel.org
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
drivers/char/tpm/tpm_ppi.c