Mercurial > hg > th-libs
changeset 737:6b778871f770
Return actual errno status in case of fopen() failure.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 07 Dec 2022 15:03:36 +0200 |
parents | ca837a4417f5 |
children | 7de6eb6d427c |
files | th_ioctx_stdio.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/th_ioctx_stdio.c Wed Dec 07 15:03:09 2022 +0200 +++ b/th_ioctx_stdio.c Wed Dec 07 15:03:36 2022 +0200 @@ -15,7 +15,7 @@ { ctx->data = (void *) fopen(ctx->filename, ctx->mode); ctx->status = th_get_error(); - return (ctx->data != NULL) ? THERR_OK : THERR_FOPEN; + return (ctx->data != NULL) ? THERR_OK : ctx->status; }