]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
cast time_t to unsigned long and use %lu instead of %u
authorMark Andrews <marka@isc.org>
Tue, 14 Sep 2010 04:01:33 +0000 (04:01 +0000)
committerMark Andrews <marka@isc.org>
Tue, 14 Sep 2010 04:01:33 +0000 (04:01 +0000)
common/print.c

index 4c8ee59d6eef61a236f28bcea37bc9b62d80bf46..1878b775bf18450e55da6800deaa6c0e1362f193 100644 (file)
@@ -1492,8 +1492,8 @@ print_time(TIME t)
                if ((strftime(buf1, sizeof(buf1),
                              "# %a %b %d %H:%M:%S %Y",
                              localtime(&t)) == 0) ||
-                   (snprintf(buf, sizeof(buf), "epoch %u; %s",
-                             since_epoch, buf1) >= sizeof(buf)))
+                   (snprintf(buf, sizeof(buf), "epoch %lu; %s",
+                             (unsigned long)since_epoch, buf1) >= sizeof(buf)))
                        return NULL;
 
        } else {