From 58d605a8e595f42dccb785f56ad2c4f06cf6c29e Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Thu, 15 Dec 2022 08:26:21 -0800 Subject: [PATCH] cgraph agxbuf: rearrange 'agxbclear' This will enable de-duplicating some code in an upcoming commit. Gitlab: #2302 --- lib/cgraph/agxbuf.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/cgraph/agxbuf.h b/lib/cgraph/agxbuf.h index 6ff51f5da..e2910fea2 100644 --- a/lib/cgraph/agxbuf.h +++ b/lib/cgraph/agxbuf.h @@ -202,6 +202,11 @@ static inline int agxbputc(agxbuf *xb, char c) { return 0; } +/* agxbclear: + * Resets pointer to data; + */ +static inline void agxbclear(agxbuf *xb) { xb->size = 0; } + /* agxbuse: * Null-terminates buffer; resets and returns pointer to data. The buffer is * still associated with the agxbuf and will be overwritten on the next, e.g., @@ -214,11 +219,6 @@ static inline char *agxbuse(agxbuf *xb) { return xb->buf; } -/* agxbclear: - * Resets pointer to data; - */ -static inline void agxbclear(agxbuf *xb) { xb->size = 0; } - /* agxbdisown: * Disassociate the backing buffer from this agxbuf and return it. The buffer is * NUL terminated before being returned. If the agxbuf is using stack memory, -- 2.40.0