sizeof(TX_Data) == 4. is that what you really want? and what does line 10 in the first example do? and why have both line 10 and line 11 writing to the same location in data_tmp?