libuci: refactor uci_get_errorstr
authorPetr Štetiar <[email protected]>
Sat, 7 Dec 2019 21:56:29 +0000 (22:56 +0100)
committerPetr Štetiar <[email protected]>
Sat, 7 Dec 2019 22:40:02 +0000 (23:40 +0100)
commitcca6f105fae201b8cb91c4551a3460028d388a35
tree0a0293bf25b9f7f846e57cfba556e68d9ffabda3
parent750b046eb77f04f82389a8af089a4945ca2d378f
libuci: refactor uci_get_errorstr

* replace strange error_info[0]=0 with complete zeroing of the buffer
* make the function body shorter and more clear, decrease indentation
  levels
* fix format string warnings:

   libuci.c:172:24: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
   libuci.c:181:19: error: format string is not a string literal [-Werror,-Wformat-nonliteral]

Reported-by: Rosen Penev <[email protected]>
Signed-off-by: Petr Štetiar <[email protected]>
libuci.c