summaryrefslogtreecommitdiff
path: root/common/src/mgw_utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/src/mgw_utils.cpp')
-rw-r--r--common/src/mgw_utils.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/src/mgw_utils.cpp b/common/src/mgw_utils.cpp
index 68fa1f8..ef9adb1 100644
--- a/common/src/mgw_utils.cpp
+++ b/common/src/mgw_utils.cpp
@@ -51,12 +51,12 @@ MESA_htable_handle mgw_utils_create_htable(const char *symbol, struct htable_opt
unsigned int mgw_utils_get_random(unsigned int num)
{
- srand((unsigned)time(NULL));
return (rand() % num);
}
-const char * mgw_utils_inet_ntoa(unsigned int ip)
+int mgw_utils_inet_ntoa(unsigned int ip, char *dest)
{
const char *_ip = inet_ntoa(*(struct in_addr *)&ip);
- return _ip;
+ strncpy(dest, _ip, MGW_SYMBOL_MAX);
+ return 0;
} \ No newline at end of file