From eeb1bd89b8445e8dcd251f3551f1a63feefc27e5 Mon Sep 17 00:00:00 2001 From: Aadhavan Srinivasan Date: Tue, 6 Feb 2024 09:42:51 -0500 Subject: [PATCH] Modified 'check_ip_ver' function to use const char pointer --- easysock.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easysock.cpp b/easysock.cpp index b872fb0..ace9f79 100644 --- a/easysock.cpp +++ b/easysock.cpp @@ -128,7 +128,7 @@ int create_remote (int network,char transport,char* address,int port,struct sock } -int check_ip_ver(char* address) { +int check_ip_ver(const char* address) { char buffer[16]; /* 16 chars - 128 bits - is enough to hold an ipv6 address */ if (inet_pton(AF_INET,address,buffer) == 1) { return 4;