# HG changeset patch # User Matti Hamalainen # Date 1531113050 -10800 # Node ID 2f129ea15405fd90f266a2f745ded56297ff7811 # Parent 2dfe46fda09e866442b32908a72a475be0109930 Adjust to new th_io_fopen() API. diff -r 2dfe46fda09e -r 2f129ea15405 sidinfo.c --- a/sidinfo.c Mon Jul 09 08:05:49 2018 +0300 +++ b/sidinfo.c Mon Jul 09 08:10:50 2018 +0300 @@ -968,13 +968,15 @@ th_ioctx *inFile = NULL; FILE *outFile; BOOL shown = FALSE; + int res; optNFiles++; outFile = stdout; - if ((inFile = th_io_fopen(&th_stdio_io_ops, filename, "rb")) == NULL) + if ((res = th_io_fopen(&inFile, &th_stdio_io_ops, filename, "rb")) != THERR_OK) { - THERR("Could not open file '%s'.\n", filename); + THERR("Could not open file '%s': %s\n", + filename, th_error_str(res)); goto error; } @@ -1092,10 +1094,10 @@ // Initialize SLDB int ret = THERR_OK; th_ioctx *inFile = NULL; - if ((inFile = th_io_fopen(&th_stdio_io_ops, setSLDBPath, "r")) == NULL) + if ((ret = th_io_fopen(&inFile, &th_stdio_io_ops, setSLDBPath, "r")) != THERR_OK) { - THERR("Could not open SLDB '%s'.\n", - setSLDBPath); + THERR("Could not open SLDB '%s': %s\n", + setSLDBPath, th_error_str(ret)); goto err; }