[PATCH] regulator: core: use snprintf() instead of scnprintf()

2017-03-06 Thread Bartosz Golaszewski
When creating the link to the device sysfs entry, the regulator core calls scnprintf() and then checks if the returned value is greater or equal than the buffer size. The former can never happen as scnprintf() returns the number of bytes that were actually written to the buffer, not the bytes

[PATCH] regulator: core: use snprintf() instead of scnprintf()

2017-03-06 Thread Bartosz Golaszewski
When creating the link to the device sysfs entry, the regulator core calls scnprintf() and then checks if the returned value is greater or equal than the buffer size. The former can never happen as scnprintf() returns the number of bytes that were actually written to the buffer, not the bytes