summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpankunull <panku_null@proton.me>2025-09-06 00:03:36 +0200
committerpankunull <panku_null@proton.me>2025-09-06 00:03:36 +0200
commitd000e66227cf15c97812d19f098c6fd8e2a00835 (patch)
tree9b22075b52b58a7cdd6b35c725b93e9f49278e6e
parent1acd14aa77268bd75afd465496bba57d6b1e5436 (diff)
added PROGRAM_NAME
-rw-r--r--src/iptool.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/iptool.c b/src/iptool.c
index e940c52..105f7a8 100644
--- a/src/iptool.c
+++ b/src/iptool.c
@@ -15,6 +15,8 @@
#include <stdio.h>
#include <stdlib.h>
+#define PROGRAM_NAME "iptool"
+
static uint32_t ip_to_u32(const char *ip_str)
{
int o1, o2, o3, o4;
@@ -91,7 +93,7 @@ int main(int argc, char *argv[])
uint32_t total, usable;
if (argc < 3) {
- fprintf(stderr, "Usage: %s <ip> <prefix>\n", argv[0]);
+ fprintf(stderr, "Usage: %s <ip> <prefix>\n", PROGRAM_NAME);
return 1;
}