Changed add_to_tx_buf from to standard C99 C