Changeset: 7ed0a7b2cdf8 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7ed0a7b2cdf8 Modified Files: sql/backends/monet5/wlr.c Branch: default Log Message:
Don't call WLCreadConfig twice, especially not with the same argument. diffs (27 lines): diff --git a/sql/backends/monet5/wlr.c b/sql/backends/monet5/wlr.c --- a/sql/backends/monet5/wlr.c +++ b/sql/backends/monet5/wlr.c @@ -178,17 +178,14 @@ WLRgetMaster(void) fd = fopen(dir,"r"); GDKfree(dir); - if( fd ){ - msg = WLCreadConfig(fd); - if( msg != MAL_SUCCEED) - return msg; - if( ! wlr_master[0] ) - throw(MAL,"wlr.getMaster","Master not identified\n"); - wlc_state = WLC_CLONE; // not used as master - } else + if (fd == NULL) throw(MAL,"wlr.getMaster","Could not get read access to '%s'config file\n", wlr_master); - if((msg = WLCreadConfig(fd))) + msg = WLCreadConfig(fd); + if( msg != MAL_SUCCEED) return msg; + if( ! wlr_master[0] ) + throw(MAL,"wlr.getMaster","Master not identified\n"); + wlc_state = WLC_CLONE; // not used as master if( !wlr_master[0] ) throw(MAL,"wlr.getMaster","Master not identified\n"); wlc_state = WLC_CLONE; // not used as master _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list