Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 16.09 30 lines 1.1 kB view raw
1Title: Fix boolean comparison error (and FTBFS with gcc-5) 2Date: 2015-06-28 3Author: Pierre Chifflier <pollux@debian.org> 4Bug-Debian: http://bugs.debian.org/778147 5Index: tpm-tools/src/tpm_mgmt/tpm_nvcommon.c 6=================================================================== 7--- tpm-tools.orig/src/tpm_mgmt/tpm_nvcommon.c 8+++ tpm-tools/src/tpm_mgmt/tpm_nvcommon.c 9@@ -140,8 +140,8 @@ int parseStringWithValues(const char *aA 10 aArg); 11 return -1; 12 } 13- if (!aArg[offset+numbytes] == '|' && 14- !aArg[offset+numbytes] == 0) { 15+ if (!(aArg[offset+numbytes] == '|' || 16+ aArg[offset+numbytes] == 0)) { 17 logError(_("Illegal character following " 18 "hexadecimal number in %s\n"), 19 aArg + offset); 20@@ -164,8 +164,8 @@ int parseStringWithValues(const char *aA 21 return -1; 22 } 23 24- if (!aArg[offset+numbytes] == '|' && 25- !aArg[offset+numbytes] == 0) { 26+ if (!(aArg[offset+numbytes] == '|' || 27+ aArg[offset+numbytes] == 0)) { 28 logError(_("Illegal character following decimal " 29 "number in %s\n"), 30 aArg + offset);