
Nov. 30, 2015
6:02 a.m.
Stefan Berger wrote:
+++ b/src/tcgbios.c +static u32 +read_stclear_flags(char *buf, int buf_len) +{ .. + if (rc || returnCode) + goto err_exit; .. +err_exit: + dprintf(DEBUG_tcg, "TCGBIOS: TPM malfunctioning (line %d).\n", __LINE__);
I can't help but think that it would be significantly more useful to turn the "goto err_exit" into a macro everywhere. Something like: #define malfunc_err_exit() do { \ dprintf(DEBUG_tcg, "TCGBIOS: TPM malfunctioning (line %d).\n", __LINE__); \ goto err_exit; \ } while (0) ..so that the line number of the actual problem is output. //Peter