diff th_ioctx.c @ 769:8eca15bde07d

Rename some th_ioctx members.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 12 Feb 2023 09:04:33 +0200
parents 31bc1ed07cf5
children c17eadc60c3d
line wrap: on
line diff
--- a/th_ioctx.c	Fri Feb 10 02:46:57 2023 +0200
+++ b/th_ioctx.c	Sun Feb 12 09:04:33 2023 +0200
@@ -40,18 +40,18 @@
 
     th_io_init(ctx);
 
-    ctx->allocated = true;
+    ctx->ctx_allocated = true;
     ctx->fops = fops;
 
     ctx->filename = th_strdup(filename);
-    ctx->fallocated = true;
+    ctx->fn_allocated = true;
     if (filename != NULL && ctx->filename == NULL)
         goto err;
 
     if (mode != NULL && (ctx->mode = th_strdup(mode)) == NULL)
         goto err;
 
-    ctx->mallocated = true;
+    ctx->md_allocated = true;
 
     return ctx;
 
@@ -88,14 +88,14 @@
 
     thfclose(ctx);
 
-    if (ctx->mallocated)
+    if (ctx->md_allocated)
     {
         if ((ctx->status = th_pstr_cpy(&ctx->mode, mode)) != THERR_OK)
             return ctx->status;
     }
     else
     {
-        ctx->mallocated = true;
+        ctx->md_allocated = true;
         if ((ctx->mode = th_strdup(mode)) == NULL)
             return THERR_MALLOC;
     }
@@ -110,13 +110,13 @@
     {
         thfclose(ctx);
 
-        if (ctx->fallocated)
+        if (ctx->fn_allocated)
             th_free_r(&ctx->filename);
 
-        if (ctx->mallocated)
+        if (ctx->md_allocated)
             th_free_r(&ctx->mode);
 
-        if (ctx->allocated)
+        if (ctx->ctx_allocated)
             th_free(ctx);
     }
 }