]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[869] (unrelated cleanup) some coding guideline fixes; more explicit about #include.
authorJINMEI Tatuya <jinmei@isc.org>
Fri, 21 Oct 2011 22:56:35 +0000 (15:56 -0700)
committerJINMEI Tatuya <jinmei@isc.org>
Fri, 21 Oct 2011 22:56:35 +0000 (15:56 -0700)
src/bin/auth/common.cc

index 35381a1d49d7fd3ebce793d73f2993e7577e51e8..a7031f3c57ad155df0094442779a62131934ff8f 100644 (file)
 // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 // PERFORMANCE OF THIS SOFTWARE.
 
+#include <string>
+
 #include <auth/common.h>
 #include <auth/spec_config.h>
 #include <stdlib.h>
 
 using std::string;
 
-string getXfroutSocketPath() {
+string
+getXfroutSocketPath() {
     if (getenv("B10_FROM_BUILD") != NULL) {
-        if (getenv("B10_FROM_SOURCE_LOCALSTATEDIR")) {
+        if (getenv("B10_FROM_SOURCE_LOCALSTATEDIR") != NULL) {
             return (string(getenv("B10_FROM_SOURCE_LOCALSTATEDIR")) +
                     "/auth_xfrout_conn");
         } else {
             return (string(getenv("B10_FROM_BUILD")) + "/auth_xfrout_conn");
         }
     } else {
-        if (getenv("BIND10_XFROUT_SOCKET_FILE")) {
+        if (getenv("BIND10_XFROUT_SOCKET_FILE") != NULL) {
             return (getenv("BIND10_XFROUT_SOCKET_FILE"));
         } else {
             return (UNIX_SOCKET_FILE);