summaryrefslogtreecommitdiffstats
path: root/include/osmocom/core/utils.h
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2019-05-10 09:28:24 +0200
committerHarald Welte <laforge@gnumonks.org>2019-05-10 13:36:08 +0200
commitea9ea52bbbcb63a6cbba91a3914a706242af06b0 (patch)
treedde7f7f2cc0066dfc9f6337cfa41605c12cce678 /include/osmocom/core/utils.h
parentea8272c3b619ab7a03eab811050c0700e05fd398 (diff)
osmo_sock_get_name_*: Ensure string is returned in error case
osmo_sock_get_name_buf(): In case the getsockname() call is failing for some weird reason, we shouldn't return an uninitialized, non-zero-terminated string buffer to the caller, as most callers will be too lazy to test the return value. This holds even more true for users of the internal osmo_sock_get_name2() and osmo_sock_get_name2_c() functions which indeed very much ignore the return value of osmo_sock_get_name_buf(). Change-Id: I2d56327e96b7a6783cca38b828c5ee74aed776ae
Diffstat (limited to 'include/osmocom/core/utils.h')
0 files changed, 0 insertions, 0 deletions