summaryrefslogtreecommitdiff
path: root/krl.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2020-04-03 05:48:57 +0000
committerDamien Miller <djm@mindrot.org>2020-04-03 16:53:50 +1100
commit338ccee1e7fefa47f3d128c2541e94c5270abe0c (patch)
tree217d4664aae2e603ae6fad105c799d8805125a83 /krl.c
parent9f8a42340bd9af86a99cf554dc39ecdf89287544 (diff)
upstream: avoid another compiler warning spotted in -portable
OpenBSD-Commit-ID: 1d29c51ac844b287c4c8bcaf04c63c7d9ba3b8c7
Diffstat (limited to 'krl.c')
-rw-r--r--krl.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/krl.c b/krl.c
index c8505c83d..c431f7047 100644
--- a/krl.c
+++ b/krl.c
@@ -14,7 +14,7 @@
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */ 15 */
16 16
17/* $OpenBSD: krl.c,v 1.49 2020/04/03 04:43:24 djm Exp $ */ 17/* $OpenBSD: krl.c,v 1.50 2020/04/03 05:48:57 djm Exp $ */
18 18
19#include "includes.h" 19#include "includes.h"
20 20
@@ -1370,7 +1370,8 @@ krl_dump(struct ssh_krl *krl, FILE *f)
1370 1370
1371 /* Try to print in a KRL spec-compatible format */ 1371 /* Try to print in a KRL spec-compatible format */
1372 format_timestamp(krl->generated_date, timestamp, sizeof(timestamp)); 1372 format_timestamp(krl->generated_date, timestamp, sizeof(timestamp));
1373 fprintf(f, "# KRL version %llu\n", krl->krl_version); 1373 fprintf(f, "# KRL version %llu\n",
1374 (unsigned long long)krl->krl_version);
1374 fprintf(f, "# Generated at %s\n", timestamp); 1375 fprintf(f, "# Generated at %s\n", timestamp);
1375 if (krl->comment != NULL && *krl->comment != '\0') { 1376 if (krl->comment != NULL && *krl->comment != '\0') {
1376 r = INT_MAX; 1377 r = INT_MAX;
@@ -1427,11 +1428,13 @@ krl_dump(struct ssh_krl *krl, FILE *f)
1427 free(fp); 1428 free(fp);
1428 } 1429 }
1429 RB_FOREACH(rs, revoked_serial_tree, &rc->revoked_serials) { 1430 RB_FOREACH(rs, revoked_serial_tree, &rc->revoked_serials) {
1430 if (rs->lo == rs->hi) 1431 if (rs->lo == rs->hi) {
1431 fprintf(f, "serial: %llu\n", rs->lo); 1432 fprintf(f, "serial: %llu\n",
1432 else { 1433 (unsigned long long)rs->lo);
1434 } else {
1433 fprintf(f, "serial: %llu-%llu\n", 1435 fprintf(f, "serial: %llu-%llu\n",
1434 rs->lo, rs->hi); 1436 (unsigned long long)rs->lo,
1437 (unsigned long long)rs->hi);
1435 } 1438 }
1436 } 1439 }
1437 RB_FOREACH(rki, revoked_key_id_tree, &rc->revoked_key_ids) { 1440 RB_FOREACH(rki, revoked_key_id_tree, &rc->revoked_key_ids) {