#define BOOTINFOSTR(base, id, string) \
do { \
- int i; \
stw_p(base, id); \
base += 2; \
stw_p(base, \
(sizeof(struct bi_record) + strlen(string) + \
1 /* null termination */ + 3 /* padding */) & ~3); \
base += 2; \
- for (i = 0; string[i]; i++) { \
- stb_p(base++, string[i]); \
+ for (unsigned i_ = 0; string[i_]; i_++) { \
+ stb_p(base++, string[i_]); \
} \
stb_p(base++, 0); \
base = QEMU_ALIGN_PTR_UP(base, 4); \
#define BOOTINFODATA(base, id, data, len) \
do { \
- int i; \
stw_p(base, id); \
base += 2; \
stw_p(base, \
base += 2; \
stw_p(base, len); \
base += 2; \
- for (i = 0; i < len; ++i) { \
- stb_p(base++, data[i]); \
+ for (unsigned i_ = 0; i_ < len; ++i_) { \
+ stb_p(base++, data[i_]); \
} \
base = QEMU_ALIGN_PTR_UP(base, 4); \
} while (0)