diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-08-14 16:12:42 -0400 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-08-14 14:13:52 -0700 |
commit | a781d3a44ea136af4e166e9018644166a9755f54 (patch) | |
tree | fcd327b94a0a93f3585cff51974ab3220b0dc5f5 /tests | |
parent | f2c45c81878bd62e5a37e3cb7f26961e6286d1cd (diff) | |
download | subsurface-a781d3a44ea136af4e166e9018644166a9755f54.tar.gz |
Cleanup: fix warning in unix.c
The compiler complained about assigning the "const char *" returned by
mb_cstring() to a "char *". The warning is correct, as the returned
buffer still belongs to the membuffer. The code only worked because
destruction of the membuffer was "forgotten".
Fix this by using the "detach_buffer()" function, which passes ownership
to the caller and accordingly returns a "char *".
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions