Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2023-11-30 00:00:19 +0300
committerFelix Fietkau <nbd@nbd.name>2023-11-30 00:00:19 +0300
commite84c000c4756ae3d0aa80b2c66ec43cf7fc416c4 (patch)
tree25bd9834595b77a4c0b73330980f931ae5d36cfc
parent325fea5c57cf7917ff5e633dd28715af84018993 (diff)
udebug: add inline helper function to test if a buffer is allocated
Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r--udebug.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/udebug.h b/udebug.h
index 75c2e3f..3b6c851 100644
--- a/udebug.h
+++ b/udebug.h
@@ -166,6 +166,10 @@ int udebug_buf_add(struct udebug *ctx, struct udebug_buf *buf,
const struct udebug_buf_meta *meta);
uint64_t udebug_buf_flags(struct udebug_buf *buf);
void udebug_buf_free(struct udebug_buf *buf);
+static inline bool udebug_buf_valid(struct udebug_buf *buf)
+{
+ return buf->hdr;
+}
struct udebug_remote_buf *udebug_remote_buf_get(struct udebug *ctx, uint32_t id);
int udebug_remote_buf_map(struct udebug *ctx, struct udebug_remote_buf *rb, uint32_t id);