mirror of https://gerrit.osmocom.org/libosmocore
bitgen test: fix concat macro
..compilers might not like concatenating "nothing", and it looks weird. Change-Id: Ibcd49a5c5c4f4fd0406fa1697edfd59307eac6f7
This commit is contained in:
parent
ee7b8c5273
commit
555c293867
|
@ -14,17 +14,17 @@
|
||||||
for (at_idx = 0; at_idx < len; at_idx++) { \
|
for (at_idx = 0; at_idx < len; at_idx++) { \
|
||||||
uint##SIZE##_t read_val = 0; \
|
uint##SIZE##_t read_val = 0; \
|
||||||
memset(buf, 0, sizeof(buf)); \
|
memset(buf, 0, sizeof(buf)); \
|
||||||
osmo_store##SIZE####BE_LE##_ext(val, &buf[at_idx], len); \
|
osmo_store##SIZE##BE_LE##_ext(val, &buf[at_idx], len); \
|
||||||
printf("osmo_store" #SIZE #BE_LE "_ext(0x%" PRIx##SIZE ", &buf[%d], %d) = %s\n", \
|
printf("osmo_store" #SIZE #BE_LE "_ext(0x%" PRIx##SIZE ", &buf[%d], %d) = %s\n", \
|
||||||
val, \
|
val, \
|
||||||
at_idx, len, osmo_hexdump(buf, sizeof(buf))); \
|
at_idx, len, osmo_hexdump(buf, sizeof(buf))); \
|
||||||
\
|
\
|
||||||
read_val = osmo_load##SIZE####BE_LE##_ext(&buf[at_idx], len); \
|
read_val = osmo_load##SIZE##BE_LE##_ext(&buf[at_idx], len); \
|
||||||
printf("osmo_load" #SIZE #BE_LE "_ext(&buf[%d], %d) = 0x%" PRIx##SIZE "\n", \
|
printf("osmo_load" #SIZE #BE_LE "_ext(&buf[%d], %d) = 0x%" PRIx##SIZE "\n", \
|
||||||
at_idx, len, read_val); \
|
at_idx, len, read_val); \
|
||||||
\
|
\
|
||||||
if (!strcmp(#BE_LE, "be")) { \
|
if (!strcmp(#BE_LE, "be")) { \
|
||||||
read_val = osmo_load##SIZE####BE_LE##_ext_2(&buf[at_idx], len); \
|
read_val = osmo_load##SIZE##BE_LE##_ext_2(&buf[at_idx], len); \
|
||||||
printf("osmo_load" #SIZE #BE_LE "_ext_2(&buf[%d], %d) = 0x%" PRIx##SIZE "\n", \
|
printf("osmo_load" #SIZE #BE_LE "_ext_2(&buf[%d], %d) = 0x%" PRIx##SIZE "\n", \
|
||||||
at_idx, len, read_val); \
|
at_idx, len, read_val); \
|
||||||
} \
|
} \
|
||||||
|
|
Loading…
Reference in New Issue