]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/shared/util.c
util.c: check if return value from ttyname_r is > 0 instead of != 0
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Sat, 30 Nov 2013 22:45:31 +0000 (23:45 +0100)
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Sat, 30 Nov 2013 23:14:28 +0000 (00:14 +0100)
commit27373e442747010dfc195296c0705f67e905a611
tree2290c4e18a6b2c057011d7443cfe79de3493b24a
parenta051da35ce96923e31a532c86a530bfd40d5dc76
util.c: check if return value from ttyname_r is > 0 instead of != 0

We must return a negative error code from getttyname_malloc but
that would not be the case if ttyname_r returned a negative value.

ttyname_r should only return EBADF, ENOTTY, or ERANGE so it should
be safe to change.
src/shared/util.c