Cómo fusionar 2 bytes en un entero

int number = buf[0] | buf[1] << 8;
Elegant Earthworm