This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
fixeria gerrit-no-reply at lists.osmocom.orgfixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/16149 ) Change subject: libosmovty: simplify condition checking vty->fd in vty_close() ...................................................................... libosmovty: simplify condition checking vty->fd in vty_close() On POSIX systems, standard I/O streams - stdin, stdout, and stderr, always have default file descriptors 0, 1, and 2 respectively. Change-Id: Ied35d142af0ba0f5ad78975b8f22c35b32d6ff71 --- M src/vty/vty.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/49/16149/1 diff --git a/src/vty/vty.c b/src/vty/vty.c index 8cc2a3a..ebdf9fc 100644 --- a/src/vty/vty.c +++ b/src/vty/vty.c @@ -231,8 +231,8 @@ /* Unset vector. */ vector_unset(vtyvec, vty->fd); - /* Close socket. */ - if (vty->fd > 0 && vty->fd != fileno(stderr)) { + /* Close socket (ignore standard I/O streams). */ + if (vty->fd > 2) { close(vty->fd); vty->fd = -1; } -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16149 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ied35d142af0ba0f5ad78975b8f22c35b32d6ff71 Gerrit-Change-Number: 16149 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <axilirator at gmail.com> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191121/0fff3ec2/attachment.htm>