b8bb43a0fc0611affa6ec2ba9696d362b5ef578e max Tue Jan 28 10:17:17 2014 -0800 small changes after code review, refs #12570 diff --git src/hg/lib/wigDataStream.c src/hg/lib/wigDataStream.c index 392a022..df5521f 100644 --- src/hg/lib/wigDataStream.c +++ src/hg/lib/wigDataStream.c @@ -321,31 +321,31 @@ AllocVar(bed); bed->chrom = cloneString(chrom); bed->chromStart = start; bed->chromEnd = end; safef(name, sizeof(name), "%s.%u", chrom, lineCount); bed->name = cloneString(name); return bed; } static void closeWibFile(struct wiggleDataStream *wds) /* if there is a Wib file open, close it */ { if (wds->wibFH > 0) udcFileClose(&wds->wibFH); -wds->wibFH = (struct udcFile*)-1; +wds->wibFH = (struct udcFile*)NULL; if (wds->wibFile) freez(&wds->wibFile); } static void closeWigConn(struct wiggleDataStream *wds) { lineFileClose(&wds->lf); closeWibFile(wds); /* closes only if it is open */ if (wds->conn) { sqlFreeResult(&wds->sr); hFreeConn(&wds->conn); } if (wds->sqlConstraint) freez(&wds->sqlConstraint); /* always reconstructed at open time */ @@ -2247,31 +2247,31 @@ freez(wds); } } struct wiggleDataStream *wiggleDataStreamNew() { struct wiggleDataStream *wdstream; AllocVar(wdstream); /* everything is zero which is good since that is NULL for all the * strings and lists. A few items should have some initial values * which are not necessarily NULL */ wdstream->isFile = FALSE; wdstream->useDataConstraint = FALSE; -wdstream->wibFH = (struct udcFile*)-1; +wdstream->wibFH = (struct udcFile*)NULL; wdstream->limit_0 = -1 * INFINITY; wdstream->limit_1 = INFINITY; wdstream->wigCmpSwitch = wigNoOp_e; wdstream->freeConstraints = freeConstraints; wdstream->freeAscii = freeAscii; wdstream->freeBed = freeBed; wdstream->freeStats = freeStats; wdstream->freeArray = freeArray; wdstream->setMaxOutput = setMaxOutput; wdstream->setPositionConstraint = setPositionConstraint; wdstream->setChromConstraint = setChromConstraint; wdstream->setSpanConstraint = setSpanConstraint; wdstream->setDataConstraint = setDataConstraint; wdstream->bedOut = bedOut; wdstream->statsOut = statsOut;