From 91e6825cb24f43d5d375096c4caba0a26626b79d Mon Sep 17 00:00:00 2001 From: Vadim Vetrov Date: Fri, 3 Jan 2025 03:24:37 +0300 Subject: [PATCH] Fix error messages --- src/youtubeUnblock.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/youtubeUnblock.c b/src/youtubeUnblock.c index a8bb876..737ffeb 100644 --- a/src/youtubeUnblock.c +++ b/src/youtubeUnblock.c @@ -578,11 +578,11 @@ int init_queue(int queue_num) { ret = mnl_cb_run(buf, ret, 0, portid, queue_cb, &qdata); if (ret < 0) { - lgerror(-EPERM, "mnl_cb_run"); - if (errno == EPERM) { - lgerror(-errno, "Probably another instance of youtubeUnblock with the same queue number is running\n"); + lgerror(ret, "mnl_cb_run"); + if (ret == -EPERM) { + lgerr("Probably another instance of youtubeUnblock with the same queue number is running\n"); } else { - lgerror(-errno, "Make sure the nfnetlink_queue kernel module is loaded\n"); + lgerr("Make sure the nfnetlink_queue kernel module is loaded\n"); } goto die; }