Skip to content

Commit

Permalink
update to YES/NO removal
Browse files Browse the repository at this point in the history
Signed-off-by: William Roberts <william.c.roberts@intel.com>
  • Loading branch information
William Roberts committed Mar 1, 2018
1 parent 7a09eaf commit 0f7b2f6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tools/tpm2_clearlock.c
Expand Up @@ -52,7 +52,7 @@ static clearlock_ctx ctx = {
static bool clearlock(TSS2_SYS_CONTEXT *sapi_context) {

TPMI_RH_CLEAR rh = ctx.platform ? TPM2_RH_PLATFORM : TPM2_RH_LOCKOUT;
TPMI_YES_NO disable = ctx.clear ? NO : YES;
TPMI_YES_NO disable = ctx.clear ? 0 : 1;

LOG_INFO ("Sending TPM2_ClearControl(%s) command on %s",
ctx.clear ? "CLEAR" : "SET",
Expand Down
3 changes: 1 addition & 2 deletions tools/tpm2_encryptdecrypt.c
Expand Up @@ -68,7 +68,6 @@ struct tpm_encrypt_decrypt_ctx {

static tpm_encrypt_decrypt_ctx ctx = {
.session_data = TPMS_AUTH_COMMAND_EMPTY_INIT,
.is_decrypt = NO,
.data = TPM2B_EMPTY_INIT,
};

Expand Down Expand Up @@ -139,7 +138,7 @@ static bool on_option(char key, char *value) {
ctx.flags.P = 1;
break;
case 'D':
ctx.is_decrypt = YES;
ctx.is_decrypt = 1;
break;
case 'I':
ctx.data.size = sizeof(ctx.data.buffer);
Expand Down
2 changes: 1 addition & 1 deletion tools/tpm2_flushcontext.c
Expand Up @@ -74,7 +74,7 @@ get_capability_handles(TSS2_SYS_CONTEXT *sapi_ctx, UINT32 property,
NULL);
if (rval != TSS2_RC_SUCCESS) {
LOG_PERR(Tss2_Sys_GetCapability, rval);
} else if (more_data == YES) {
} else if (more_data) {
LOG_WARN("More data to be queried: capability: 0x%x, property: "
"0x%x", TPM2_CAP_HANDLES, property);
}
Expand Down
2 changes: 1 addition & 1 deletion tools/tpm2_getcap.c
Expand Up @@ -877,7 +877,7 @@ get_tpm_capability_all (TSS2_SYS_CONTEXT *sapi_ctx,
LOG_ERR("Failed to GetCapability: capability: 0x%x, property: 0x%x",
options.capability, options.property);
LOG_PERR(Tss2_Sys_GetCapability, rval);
} else if (more_data == YES) {
} else if (more_data) {
LOG_WARN("More data to be queried: capability: 0x%x, property: "
"0x%x\n", options.capability, options.property);
}
Expand Down

0 comments on commit 0f7b2f6

Please sign in to comment.