From f4525c433c159ea8901281ad59800caebaadce02 Mon Sep 17 00:00:00 2001 From: claudio Date: Fri, 24 Dec 2021 09:21:41 +0000 Subject: [PATCH] Sync test code after the change of id from size_t to unsigned int. Fixes test-http tests which currently fail. The change in test-rrdp.c are just cosmetic the id is not used by the test. Reported by anton@ --- regress/usr.sbin/rpki-client/test-http.c | 6 +++--- regress/usr.sbin/rpki-client/test-rrdp.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/regress/usr.sbin/rpki-client/test-http.c b/regress/usr.sbin/rpki-client/test-http.c index e1482a3ba59..e55037efb7e 100644 --- a/regress/usr.sbin/rpki-client/test-http.c +++ b/regress/usr.sbin/rpki-client/test-http.c @@ -36,7 +36,7 @@ getmonotime(void) } static void -http_request(size_t id, const char *uri, const char *last_mod, int fd) +http_request(unsigned int id, const char *uri, const char *last_mod, int fd) { struct ibuf *b; @@ -68,7 +68,7 @@ static int http_response(int fd) { struct ibuf *b, *httpbuf = NULL; - size_t id; + unsigned int id; enum http_result res; char *lastmod; @@ -94,7 +94,7 @@ main(int argc, char **argv) int error, fd[2], outfd, http; int fl = SOCK_STREAM | SOCK_CLOEXEC; char *uri, *file, *mod; - size_t req = 0; + unsigned int req = 0; if (argc != 3 && argc != 4) { fprintf(stderr, "usage: test-http uri file [last-modified]\n"); diff --git a/regress/usr.sbin/rpki-client/test-rrdp.c b/regress/usr.sbin/rpki-client/test-rrdp.c index 04d14ccf600..35cc24013e6 100644 --- a/regress/usr.sbin/rpki-client/test-rrdp.c +++ b/regress/usr.sbin/rpki-client/test-rrdp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: test-rrdp.c,v 1.1 2021/12/01 09:03:19 claudio Exp $ */ +/* $OpenBSD: test-rrdp.c,v 1.2 2021/12/24 09:21:41 claudio Exp $ */ /* * Copyright (c) 2020 Nils Fisher * Copyright (c) 2021 Claudio Jeker @@ -50,7 +50,7 @@ struct rrdp { TAILQ_ENTRY(rrdp) entry; - size_t id; + unsigned int id; char *notifyuri; char *local; char *last_mod; @@ -128,7 +128,7 @@ rrdp_publish_file(struct rrdp *s, struct publish_xml *pxml, } static struct rrdp * -rrdp_new(size_t id, char *local, char *notify, char *session_id, +rrdp_new(unsigned int id, char *local, char *notify, char *session_id, long long serial, char *last_mod) { struct rrdp *s; @@ -180,7 +180,7 @@ static void rrdp_finished(struct rrdp *s) { XML_Parser p = s->parser; - size_t id = s->id; + unsigned int id = s->id; if (s->state & RRDP_STATE_PARSE_ERROR) return; -- 2.20.1