[Replicant] [libsamsung-ipc] [PATCH 20/21] ipc-modem: fix duplicated code

Denis 'GNUtoo' Carikli GNUtoo at cyberdimension.org
Fri Jun 17 16:15:52 UTC 2022


If the following fails:
    data.client = ipc_client_create(IPC_CLIENT_TYPE_DUMMY);
then we cannot use ipc_modem_log, but we can use printf instead.

This bug was introduced in commit aa738074f34c ("tools: ipc-modem:
convert to sysexits.h").

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at cyberdimension.org>
---
 tools/ipc-modem/ipc-modem.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/tools/ipc-modem/ipc-modem.c b/tools/ipc-modem/ipc-modem.c
index 01498dd..3933491 100644
--- a/tools/ipc-modem/ipc-modem.c
+++ b/tools/ipc-modem/ipc-modem.c
@@ -759,11 +759,8 @@ int main(int argc, char *argv[])
 					"Could not create IPC client; "
 					"aborting ...\n");
 			else
-				ipc_modem_log(
-					data.client,
-					MODEM_LOG_ERROR,
-					"Could not create IPC client; "
-					"aborting ...\n");
+				printf("Could not create IPC client; "
+				       "aborting ...\n");
 
 			return EX_UNAVAILABLE;
 		}
-- 
2.36.1



More information about the Replicant mailing list