Attention is currently required from: Nico Huber, Paul Menzel, Anastasia Klimchuk.
Patch set 6:Code-Review +1
2 comments:
File tests/chip.c:
Patch Set #6, Line 33: .buf = { MOCK_CHIP_CONTENT },
This only initialises the first element of `buf`, the rest of the array is initialised to 0. I see it gets filled later on, but I find this potentially misleading.
I'd remove the static initialiser (or leave it to explicitly initialise to 0) and put the actual initialisation code in a helper function just below.
Patch Set #6, Line 97: memset(&g_chip_state.buf[0], MOCK_CHIP_CONTENT, MOCK_CHIP_SIZE);
How about:
memset(g_chip_state.buf, MOCK_CHIP_CONTENT, sizeof(g_chip_state.buf));
To view, visit change 59237. To unsubscribe, or for help writing mail filters, visit settings.