comparison th_ioctx.c @ 697:87e97ea5afd1

Add some error checking.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 09 Mar 2020 22:26:19 +0200
parents a04b8fe158b9
children 29d9083dff1c
comparison
equal deleted inserted replaced
696:9bbacd72df3d 697:87e97ea5afd1
97 if (ctx == NULL) 97 if (ctx == NULL)
98 return THERR_NULLPTR; 98 return THERR_NULLPTR;
99 99
100 thfclose(ctx); 100 thfclose(ctx);
101 101
102 th_pstr_cpy(&ctx->mode, mode); 102 if ((ctx->status = th_pstr_cpy(&ctx->mode, mode)) != THERR_OK)
103 return ctx->status;
103 104
104 return (ctx->status = thfopen(ctx)); 105 return (ctx->status = thfopen(ctx));
105 } 106 }
106 107
107 108