A question for a C guru

Standard

English: Dada guru

Image via Wikipedia

The debugging continues, but unfortunately I have not yet been able to identify what is fundamentally broken with my file system code.

But along the way I have spotted and fixed various bugs. Here is one, I am not even sure why it compiled in the first place, so maybe a C guru could tell me…

Was:

if le16_to_cpu(((u16 *) bh->b_data)[j * VMU_DIR_RECORD_LEN16 + VMUFAT_FIRSTBLOCK_OFFSET16] == ino)

Now:

if (le16_to_cpu(((u16 *) bh->b_data)[j * VMU_DIR_RECORD_LEN16 + VMUFAT_FIRSTBLOCK_OFFSET16]) == ino)

2 thoughts on “A question for a C guru

    • Tobi, You are quite right in that it is a macro. Well spotted. Though it’s a macro that references another macro – which I assume is bracketed as you say, though haven’t been able to confirm that.

Comments are closed.