Module Name: src
Committed By: christos
Date: Sat Jan 28 03:04:28 UTC 2012
Modified Files:
src/crypto/external/cpl/tpm-tools/dist/src/tpm_mgmt: tpm_nvcommon.c
Log Message:
handle ctype lossage
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/crypto/external/cpl/tpm-tools/dist/src/tpm_mgmt/tpm_nvcommon.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/crypto/external/cpl/tpm-tools/dist/src/tpm_mgmt/tpm_nvcommon.c
diff -u src/crypto/external/cpl/tpm-tools/dist/src/tpm_mgmt/tpm_nvcommon.c:1.1.1.1 src/crypto/external/cpl/tpm-tools/dist/src/tpm_mgmt/tpm_nvcommon.c:1.2
--- src/crypto/external/cpl/tpm-tools/dist/src/tpm_mgmt/tpm_nvcommon.c:1.1.1.1 Fri Jan 27 21:57:27 2012
+++ src/crypto/external/cpl/tpm-tools/dist/src/tpm_mgmt/tpm_nvcommon.c Fri Jan 27 22:04:27 2012
@@ -116,7 +116,7 @@ int parseStringWithValues(const char *aA
while (offset < totlen) {
int found = 0;
- while (isspace(*(aArg + offset)))
+ while (isspace((unsigned char)*(aArg + offset)))
offset++;
for (i = 0; svals[i].name; i++) {
@@ -155,7 +155,7 @@ int parseStringWithValues(const char *aA
}
while (!found) {
- if (!isdigit(*(aArg+offset)))
+ if (!isdigit((unsigned char)*(aArg+offset)))
break;
if (sscanf(aArg + offset, "%u%n", &num, &numbytes) != 1) {
@@ -247,7 +247,7 @@ int parseHexOrDecimal(const char *aArg,
unsigned int minimum, unsigned int maximum,
const char *name)
{
- while (isspace(*aArg))
+ while (isspace((unsigned char)*aArg))
aArg++;
if (strncmp(aArg, "0x", 2) == 0) {
@@ -255,7 +255,7 @@ int parseHexOrDecimal(const char *aArg,
return -1;
}
} else {
- if (!isdigit(*aArg)) {
+ if (!isdigit((unsigned char)*aArg)) {
fprintf(stderr,
"%s must be a positive integer.\n", name);
return -1;