]> granicus.if.org Git - pdns/commitdiff
Remove unnecessary if block
authorAki Tuomi <cmouse@desteem.org>
Mon, 9 Dec 2013 12:13:22 +0000 (14:13 +0200)
committerAki Tuomi <cmouse@desteem.org>
Mon, 9 Dec 2013 12:13:22 +0000 (14:13 +0200)
modules/remotebackend/pipeconnector.cc

index 0f8b1b91a40752d20885cfe6311080b417eeccff..33c58897ba80733ba28579d6c4a7116ab6918cf1 100644 (file)
@@ -145,12 +145,8 @@ int PipeConnector::recv_message(rapidjson::Document &output)
      receive.clear();
      if(d_timeout) {
        struct timeval tv;
-       if (d_timeout) {
-         tv.tv_sec = d_timeout/1000;
-         tv.tv_usec = (d_timeout % 1000) * 1000;
-       } else {
-         memset(&tv,0,sizeof tv); // ensure
-       }
+       tv.tv_sec = d_timeout/1000;
+       tv.tv_usec = (d_timeout % 1000) * 1000;
        fd_set rds;
        FD_ZERO(&rds);
        FD_SET(fileno(d_fp),&rds);