[coreboot] r3213 - trunk/payloads/libpayload/include
Segher Boessenkool
segher at kernel.crashing.org
Fri Apr 4 22:08:38 CEST 2008
> +#define BIN2HEX(b) ("0123456789abcdef"[b & 15])
> +#define HEX2BIN(h) (('0' <= h && h <= '9') ? (h - '0') : \
> + ('a' <= h && h <= 'f') ? (h - 'a' + 10) : 0)
These macros are unsafe: lack of parentheses around the uses of
the parameters, and multiple evaluation in the second macro.
Please consider using an inline function instead (or a "real"
function, to make code size smaller).
Btw, could the SVN checkin list be set up with a followup-to: header?
Segher
More information about the coreboot
mailing list