Sync test code after the change of id from size_t to unsigned int.
authorclaudio <claudio@openbsd.org>
Fri, 24 Dec 2021 09:21:41 +0000 (09:21 +0000)
committerclaudio <claudio@openbsd.org>
Fri, 24 Dec 2021 09:21:41 +0000 (09:21 +0000)
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
regress/usr.sbin/rpki-client/test-rrdp.c

index e1482a3..e55037e 100644 (file)
@@ -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");
index 04d14cc..35cc240 100644 (file)
@@ -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 <nils_fisher@hotmail.com>
  * Copyright (c) 2021 Claudio Jeker <claudio@openbsd.org>
@@ -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;