minor renaming/rewording

This commit is contained in:
gmega 2026-01-30 12:40:07 -03:00
parent 595190e9be
commit 219bbb58a0
No known key found for this signature in database
GPG Key ID: 6290D34EAD824B18
2 changed files with 7 additions and 7 deletions

View File

@ -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

View File

@ -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;
}