summarylogtreecommitdiffstats
path: root/03-fix-bool-error-parseStringWithValues.patch
blob: 482d40c8c26bb66e23e92c364a488447eccd78f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Title: Fix boolean comparison error (and FTBFS with gcc-5)
Date: 2015-06-28
Author: Pierre Chifflier <pollux@debian.org>
Bug-Debian: http://bugs.debian.org/778147
---
 src/tpm_mgmt/tpm_nvcommon.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/src/tpm_mgmt/tpm_nvcommon.c
+++ b/src/tpm_mgmt/tpm_nvcommon.c
@@ -140,8 +140,8 @@ int parseStringWithValues(const char *aA
 						 aArg);
 					return -1;
 				}
-				if (aArg[offset+numbytes] == '|' ||
-				    aArg[offset+numbytes] == 0) {
+				if (!(aArg[offset+numbytes] == '|' ||
+				      aArg[offset+numbytes] == 0)) {
 					logError(_("Illegal character following "
                                                    "hexadecimal number in %s\n"),
 						 aArg + offset);
@@ -164,8 +164,8 @@ int parseStringWithValues(const char *aA
 				return -1;
 			}
 
-			if (!aArg[offset+numbytes] == '|' &&
-			    !aArg[offset+numbytes] == 0) {
+			if (!(aArg[offset+numbytes] == '|' ||
+			      aArg[offset+numbytes] == 0)) {
 				logError(_("Illegal character following decimal "
 				           "number in %s\n"),
 					 aArg + offset);