]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: initialize the uptime variable on startup 2678/head
authorPieter Lexis <pieter.lexis@powerdns.com>
Wed, 15 Jul 2015 12:44:27 +0000 (14:44 +0200)
committerPieter Lexis <pieter.lexis@powerdns.com>
Fri, 7 Aug 2015 11:00:51 +0000 (13:00 +0200)
pdns/dnsdist-web.cc

index e9f98c6a863decad681b30ee6d661df254288e97..9f677fb98290935aa24a7622b305aa40387140f3 100644 (file)
 #include "htmlfiles.h"
 #include "base64.hh"
 
+static time_t s_start=time(0);
 static int uptimeOfProcess()
 {
-  static time_t start=time(0);
-  return time(0) - start;
+  return time(0) - s_start;
 }