From 3df8cbf91b37c65cd9ead1834e800aa8f2e0a4e6 Mon Sep 17 00:00:00 2001 From: Stefan Berger Date: Tue, 12 May 2015 14:20:16 -0400 Subject: [PATCH] swtpm_cuse: no need to compare uint8_t locality with < 0. Signed-off-by: Stefan Berger --- src/swtpm/cuse_tpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/swtpm/cuse_tpm.c b/src/swtpm/cuse_tpm.c index fe2db35..c485bdb 100644 --- a/src/swtpm/cuse_tpm.c +++ b/src/swtpm/cuse_tpm.c @@ -664,7 +664,7 @@ static void ptm_ioctl(fuse_req_t req, int cmd, void *arg, fuse_reply_ioctl_retry(req, &iov, 1, NULL, 0); } else { ptmloc_t *l = (ptmloc_t *)in_buf; - if (l->u.req.loc < 0 || l->u.req.loc > 4) { + if (l->u.req.loc > 4) { res = TPM_BAD_LOCALITY; } else { res = 0;