From 4ffd644a14fa40b758f8937b06844861009bfec1 Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 22 Dec 2005 17:18:18 +0000 Subject: Optimized out strcpys that copy empty strings (craq++) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2637 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/users.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/users.cpp') diff --git a/src/users.cpp b/src/users.cpp index 2993b31bb..6f5c96279 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -63,8 +63,7 @@ template inline string ConvToStr(const T &in) userrec::userrec() { // the PROPER way to do it, AVOID bzero at *ALL* costs - *nick = *ident = *host = *dhost = *fullname = *modes = *awaymsg = *oper = 0; - strcpy(ip,"127.0.0.1"); + *nick = *ident = *host = *dhost = *fullname = *modes = *awaymsg = *oper = *ip = 0 server = (char*)FindServerNamePtr(Config->ServerName); reset_due = TIME; lines_in = fd = lastping = signon = idle_lastmsg = nping = registered = 0; @@ -761,7 +760,7 @@ void force_nickchange(userrec* user,const char* newnick) char nick[MAXBUF]; int MOD_RESULT = 0; - strcpy(nick,""); + *nick = 0; FOREACH_RESULT(OnUserPreNick(user,newnick)); if (MOD_RESULT) { -- cgit v1.3.1-10-gc9f91