X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fnotify-apps.c;h=9a63141dd63a5941f6ea8559fa88883f489aa0ad;hp=fee1843459e011d8ded0908c07fd317026d942b0;hb=c203f0585aa3a3b1c2b1994899b8277ed79dad2d;hpb=f9d2ba6ae32397fd818279ea90d3691c60f0e079 diff --git a/src/bin/lttng-sessiond/notify-apps.c b/src/bin/lttng-sessiond/notify-apps.c index fee184345..9a63141dd 100644 --- a/src/bin/lttng-sessiond/notify-apps.c +++ b/src/bin/lttng-sessiond/notify-apps.c @@ -1,18 +1,8 @@ /* - * Copyright (C) 2013 - David Goulet + * Copyright (C) 2013 David Goulet * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License, version 2 only, as - * published by the Free Software Foundation. + * SPDX-License-Identifier: GPL-2.0-only * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., 51 - * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #define _LGPL_SOURCE @@ -109,11 +99,6 @@ restart: revents = LTTNG_POLL_GETEV(&events, i); pollfd = LTTNG_POLL_GETFD(&events, i); - if (!revents) { - /* No activity for this FD (poll implementation). */ - continue; - } - /* Thread quit pipe has been closed. Killing thread. */ if (pollfd == quit_pipe_read_fd) { err = 0; @@ -230,7 +215,7 @@ bool launch_application_notification_thread(int apps_cmd_notify_pipe_read_fd) notifiers = zmalloc(sizeof(*notifiers)); if (!notifiers) { - goto error; + goto error_alloc; } notifiers->apps_cmd_notify_pipe_read_fd = apps_cmd_notify_pipe_read_fd; @@ -252,5 +237,6 @@ bool launch_application_notification_thread(int apps_cmd_notify_pipe_read_fd) return true; error: cleanup_application_notification_thread(notifiers); +error_alloc: return false; }