diff --git a/include/irc_string.h b/include/irc_string.h index 2aa7f41d..ba1d0a51 100644 --- a/include/irc_string.h +++ b/include/irc_string.h @@ -99,12 +99,6 @@ size_t strlcpy(char *dst, const char *src, size_t siz); size_t strlcat(char *dst, const char *src, size_t siz); #endif -#ifdef HAVE_STRNDUP -#define DupNString(x, y, len) do { x = strndup(y, len); if(x == NULL) outofmemory(); } while (0) -#else -#define DupNString(x, y, len) do { x = malloc(len+1); if(x == NULL) outofmemory(); strlcpy(x, y, len+1); } while(0) -#endif - /* * clean_string - cleanup control and high ascii characters * -Dianora diff --git a/modules/m_pass.c b/modules/m_pass.c index 3f178e49..6ef11a8e 100644 --- a/modules/m_pass.c +++ b/modules/m_pass.c @@ -67,7 +67,7 @@ mr_pass(struct Client *client_p, struct Client *source_p, int parc, const char * rb_free(client_p->localClient->passwd); } - DupNString(client_p->localClient->passwd, parv[1], PASSWDLEN); + client_p->localClient->passwd = rb_strndup(parv[1], PASSWDLEN); /* These are for servers only */ if(parc > 2 && client_p->user == NULL)