Azure-Samples / iot-hub-c-raspberrypi-client-app

Application collects weather data from a BME280 sensor and sends it to IoT hub, also take actions according to cloud-to-device message, device management.
https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-raspberry-pi-kit-c-get-started
MIT License
36 stars 34 forks source link

Fix compiler warning 1/2 #12

Closed ftheile closed 6 years ago

ftheile commented 6 years ago

Additional to the buffer start address, also pass the buffer length to get_mac_address_hash() and sha256(). sizeof(buffer) from inside the functions will not give the size of the buffer, but the size of the start address of the buffer (e.g. 4 byte).

SLdragon commented 6 years ago

Thanks a lot for your pull request!