swtpm_cert: add cast to avoid compile error on i686

Cast the exponent to unsigned long int to avoid a compiler
error reporting comparison of signed and unsigned integers.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
This commit is contained in:
Stefan Berger 2017-10-04 18:24:56 -04:00 committed by Stefan Berger
parent 19e05751c7
commit 6d42968570

View File

@ -524,7 +524,7 @@ main(int argc, char *argv[])
fprintf(stderr, "Exponent is wrong and cannot be 0.\n");
goto cleanup;
}
if (exponent > UINT_MAX) {
if ((unsigned long int)exponent > UINT_MAX) {
fprintf(stderr, "Exponent must fit into 32bits.\n");
goto cleanup;
}