From 219bbb58a0d48114e2b99272056ae7f7e8ac64d5 Mon Sep 17 00:00:00 2001 From: gmega Date: Fri, 30 Jan 2026 12:40:07 -0300 Subject: [PATCH] minor renaming/rewording --- README.md | 2 +- easylibstorage.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 374016a..6d7246e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Storage Console -A command-line interface for interacting with libstorage, providing simple file upload and download operations via a distributed storage network. +A simple wrapper and a command-line interface for interacting with libstorage, providing simple file upload and download operations via a distributed storage network. ## Prerequisites diff --git a/easylibstorage.c b/easylibstorage.c index 8f56021..06f6c54 100644 --- a/easylibstorage.c +++ b/easylibstorage.c @@ -25,7 +25,7 @@ static resp *resp_alloc(void) { return r; } -static void resp_free(resp *r) { +static void resp_destroy(resp *r) { if (!r) return; free(r->msg); free(r); @@ -93,7 +93,7 @@ static void on_progress(int ret, const char *msg, size_t len, void *userData) { // If out is non-NULL and the response has a message, *out receives a strdup'd copy. static int call_wait(int dispatch_ret, resp *r, char **out) { if (dispatch_ret != RET_OK) { - resp_free(r); + resp_destroy(r); return RET_ERR; } @@ -105,7 +105,7 @@ static int call_wait(int dispatch_ret, resp *r, char **out) { *out = r->msg ? strdup(r->msg) : NULL; } - resp_free(r); + resp_destroy(r); return result; } @@ -144,18 +144,18 @@ STORAGE_NODE e_storage_new(node_config config) { void *ctx = storage_new(json, (StorageCallback) on_complete, r); if (!ctx) { - resp_free(r); + resp_destroy(r); return NULL; } resp_wait(r); if (r->ret != RET_OK) { - resp_free(r); + resp_destroy(r); return NULL; } - resp_free(r); + resp_destroy(r); return ctx; }