From: Christian Hofstaedtler Date: Thu, 6 Feb 2014 14:45:32 +0000 (+0100) Subject: Coverity nits X-Git-Tag: rec-3.6.0-rc1~195^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F1269%2Fhead;p=thirdparty%2Fpdns.git Coverity nits Should fix CID 1168020, 1167490, 1167489, 1167488, 1126082. --- diff --git a/pdns/ext/yahttp/yahttp/reqresp.cpp b/pdns/ext/yahttp/yahttp/reqresp.cpp index 62117e31b2..03d59c149b 100644 --- a/pdns/ext/yahttp/yahttp/reqresp.cpp +++ b/pdns/ext/yahttp/yahttp/reqresp.cpp @@ -35,7 +35,7 @@ namespace YaHTTP { }; Request::~Request() {}; - Response::Response() {}; + Response::Response() : status(0) {}; Response::Response(const Request &req) { headers["connection"] = "close"; method = req.method; diff --git a/pdns/session.cc b/pdns/session.cc index c3ee0a2aa4..0634647ceb 100644 --- a/pdns/session.cc +++ b/pdns/session.cc @@ -31,13 +31,13 @@ #include "misc.hh" #include "iputils.hh" -Session::Session(int s, ComboAddress r) : d_good(true) +Session::Session(int s, ComboAddress r) : d_timeout(10), d_good(true) { d_remote=r; d_socket=s; } -Session::Session() : d_good(false) +Session::Session() : d_socket(-1), d_timeout(10), d_good(false) { } diff --git a/pdns/ws-recursor.cc b/pdns/ws-recursor.cc index 85fcb49ddb..256c1bcdc5 100644 --- a/pdns/ws-recursor.cc +++ b/pdns/ws-recursor.cc @@ -48,8 +48,10 @@ RecursorWebServer::RecursorWebServer(FDMultiplexer* fdm) { RecursorControlParser rcp; // inits - if(!arg().mustDo("experimental-webserver")) + if(!arg().mustDo("experimental-webserver")) { + d_ws = NULL; return; + } d_ws = new AsyncWebServer(fdm, arg()["experimental-webserver-address"], arg().asNum("experimental-webserver-port"), arg()["experimental-webserver-password"]);