]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Replace use of String in ProcessRoles() with SBuf
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 9 Aug 2015 10:14:38 +0000 (03:14 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 9 Aug 2015 10:14:38 +0000 (03:14 -0700)
src/tests/stub_tools.cc
src/tools.cc
src/tools.h

index 23d502a3c2756d81b138be8dabbecb6235bb9760..3090f35f5888b245e4922faf6c7c246f59e2ce8d 100644 (file)
@@ -59,8 +59,8 @@ bool IamCoordinatorProcess() STUB_RETVAL(false)
 bool IamPrimaryProcess() STUB_RETVAL(false)
 int NumberOfKids() STUB_RETVAL(0)
 
-//not yet needed in the Stub, causes dependency on String
-//String ProcessRoles() STUB_RETVAL(String())
+//not actually needed in the Stub, causes dependency on SBuf
+//SBuf ProcessRoles() STUB_RETVAL(SBuf())
 void writePidFile(void) STUB
 void removePidFile(void) STUB
 pid_t readPidFile(void) STUB_RETVAL(0)
index b3b1a7fd7eecca297250a6d02e57a93ab68795a1..84ed0231569fde6429e22c45ebf29dbd62be41ea 100644 (file)
@@ -684,10 +684,10 @@ NumberOfKids()
     return (needCoord ? 1 : 0) + Config.workers + rockDirs;
 }
 
-String
+SBuf
 ProcessRoles()
 {
-    String roles = "";
+    SBuf roles;
     if (IamMasterProcess())
         roles.append(" master");
     if (IamCoordinatorProcess())
index af185be4427ca66ee44215f9fe43b5e42163d5aa..afd055c7e5848be238a0920921a158f537b3bf04 100644 (file)
@@ -12,7 +12,6 @@
 #define SQUID_TOOLS_H_
 
 #include "SBuf.h"
-#include "SquidString.h"
 #include "typedefs.h"
 
 class MemBuf;
@@ -76,7 +75,7 @@ bool UsingSmp(); // try using specific Iam*() checks above first
 /// number of Kid processes as defined in src/ipc/Kid.h
 int NumberOfKids();
 /// a string describing this process roles such as worker or coordinator
-String ProcessRoles();
+SBuf ProcessRoles();
 
 void debug_trap(const char *);