From 30148eee6a5f6cdaa27a54e5376587c6a4693fd4 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Fri, 19 Nov 2021 13:13:23 +0000 Subject: [PATCH] marshal.[ch]: remove redundant declaration. Spotted this in passing while I was adding new functions in the same area. That 'struct strbuf;' must have been there since before I introduced defs.h to predeclare all the structure tag names and their typedefs. But marshal.h includes defs.h itself, so it has no reason to worry about the possibility that the typedef 'strbuf' might not already exist. --- marshal.h | 3 +-- utils/marshal.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/marshal.h b/marshal.h index 20094289..515f0e53 100644 --- a/marshal.h +++ b/marshal.h @@ -173,8 +173,7 @@ void BinarySink_put_uint64(BinarySink *, uint64_t); void BinarySink_put_string(BinarySink *, const void *data, size_t len); void BinarySink_put_stringpl(BinarySink *, ptrlen); void BinarySink_put_stringz(BinarySink *, const char *str); -struct strbuf; -void BinarySink_put_stringsb(BinarySink *, struct strbuf *); +void BinarySink_put_stringsb(BinarySink *, strbuf *); void BinarySink_put_asciz(BinarySink *, const char *str); bool BinarySink_put_pstring(BinarySink *, const char *str); void BinarySink_put_mp_ssh1(BinarySink *bs, mp_int *x); diff --git a/utils/marshal.c b/utils/marshal.c index 84d1391f..534ecf50 100644 --- a/utils/marshal.c +++ b/utils/marshal.c @@ -79,7 +79,7 @@ void BinarySink_put_stringz(BinarySink *bs, const char *str) BinarySink_put_string(bs, str, strlen(str)); } -void BinarySink_put_stringsb(BinarySink *bs, struct strbuf *buf) +void BinarySink_put_stringsb(BinarySink *bs, strbuf *buf) { BinarySink_put_string(bs, buf->s, buf->len); strbuf_free(buf);