summaryrefslogtreecommitdiff
path: root/lib9p/include/lib9p/9p.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib9p/include/lib9p/9p.h')
-rw-r--r--lib9p/include/lib9p/9p.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib9p/include/lib9p/9p.h b/lib9p/include/lib9p/9p.h
index 3ad52f1..c3c6a8b 100644
--- a/lib9p/include/lib9p/9p.h
+++ b/lib9p/include/lib9p/9p.h
@@ -41,6 +41,12 @@ struct lib9p_ctx {
char err_msg[CONFIG_9P_MAX_ERR_SIZE];
};
+static void lib9p_ctx_clear_error(struct lib9p_ctx *ctx) {
+ assert(ctx);
+ ctx->err_num = 0;
+ ctx->err_msg[0] = '\0';
+}
+
static bool lib9p_ctx_has_error(struct lib9p_ctx *ctx) {
assert(ctx);
return ctx->err_num || ctx->err_msg[0];