... and you could dispense with the separate copy of the data by setting const char * buffer0 = buffer2 + buffer1_size;