# HG changeset patch # User Matti Hamalainen # Date 1477558378 -10800 # Node ID 1786b9d77782786f2748ceed3da6c02843b505a9 # Parent c1462b7880e8487bc3f296241882f290e50e11ed Rename a variable, cosmetics. diff -r c1462b7880e8 -r 1786b9d77782 sidinfo.c --- a/sidinfo.c Thu Oct 27 11:52:27 2016 +0300 +++ b/sidinfo.c Thu Oct 27 11:52:58 2016 +0300 @@ -608,8 +608,10 @@ { PSFStackItem item; int i; + memset(&item, 0, sizeof(item)); siClearStack(&optFormat); + for (i = 0; i < noptPSOptions; i++) { item.cmd = i; @@ -628,8 +630,8 @@ { // Initialize SLDB int ret = THERR_OK; - th_ioctx *ctx = NULL; - if ((ctx = th_io_fopen(&th_stdio_io_ops, setSLDBPath, "r")) == NULL) + th_ioctx *inFile = NULL; + if ((inFile = th_io_fopen(&th_stdio_io_ops, setSLDBPath, "r")) == NULL) { THERR("Could not open SLDB '%s'.\n", setSLDBPath); @@ -643,13 +645,13 @@ goto err; } - if ((ret = si_sldb_read(ctx, sidSLDB)) != THERR_OK) + if ((ret = si_sldb_read(inFile, sidSLDB)) != THERR_OK) { THERR("Error parsing SLDB: %d, %s\n", ret, th_error_str(ret)); goto err; } - th_io_close(ctx); + th_io_close(inFile); if ((ret = si_sldb_build_index(sidSLDB)) != THERR_OK) { @@ -659,7 +661,7 @@ } err: - th_io_close(ctx); + th_io_close(inFile); } // Process files