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/inspircd_io.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/inspircd_io.cpp') diff --git a/src/inspircd_io.cpp b/src/inspircd_io.cpp index 1308a8dc9..b0170d0a3 100644 --- a/src/inspircd_io.cpp +++ b/src/inspircd_io.cpp @@ -936,7 +936,7 @@ int ServerConfig::ReadConf(std::stringstream *config, const char* tag, const cha if (!key) { /* value not found in tag */ - strcpy(result,""); + *result = 0; return 0; } else @@ -947,7 +947,7 @@ int ServerConfig::ReadConf(std::stringstream *config, const char* tag, const cha if (!*key) { /* missing quote */ - strcpy(result,""); + *result = 0; return 0; } key++; @@ -985,7 +985,7 @@ int ServerConfig::ReadConf(std::stringstream *config, const char* tag, const cha } } } - strcpy(result,""); // value or its tag not found at all + *result = 0; // value or its tag not found at all return 0; } -- cgit v1.3.1-10-gc9f91