From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp3.mail.ru (smtp3.mail.ru [94.100.179.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 7F26A4696C3 for ; Tue, 14 Apr 2020 14:38:48 +0300 (MSK) From: Alexander Turenko Date: Tue, 14 Apr 2020 14:38:14 +0300 Message-Id: <87c4cb72f477c07be6230a5522ad0f601598163a.1586862436.git.alexander.turenko@tarantool.org> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH 05/12] popen: remove retval from popen_stat() List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cyrill Gorcunov Cc: tarantool-patches@dev.tarantool.org The change 'popen: require popen handle to be non-NULL' makes popen_stat() function always successful. There is no reason to return a success / failure result. See the previous similar patch: 'popen: remove retval from popen_state()'. Part of #4031 --- src/lib/core/popen.c | 3 +-- src/lib/core/popen.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib/core/popen.c b/src/lib/core/popen.c index c74ac17c7..3ba1e2a48 100644 --- a/src/lib/core/popen.c +++ b/src/lib/core/popen.c @@ -239,7 +239,7 @@ popen_may_pidop(struct popen_handle *handle) /** * Fill popen object statistics. */ -int +void popen_stat(struct popen_handle *handle, struct popen_stat *st) { assert(handle != NULL); @@ -252,7 +252,6 @@ popen_stat(struct popen_handle *handle, struct popen_stat *st) for (size_t i = 0; i < lengthof(handle->ios); i++) st->fds[i] = handle->ios[i].fd; - return 0; } /** diff --git a/src/lib/core/popen.h b/src/lib/core/popen.h index 570376d33..4cdd95175 100644 --- a/src/lib/core/popen.h +++ b/src/lib/core/popen.h @@ -159,7 +159,7 @@ struct popen_stat { int fds[POPEN_FLAG_FD_STDEND_BIT]; }; -extern int +extern void popen_stat(struct popen_handle *handle, struct popen_stat *st); extern const char * -- 2.25.0