diff --git a/ext2sim/ext2sim.c b/ext2sim/ext2sim.c index 51861ec4..68248401 100644 --- a/ext2sim/ext2sim.c +++ b/ext2sim/ext2sim.c @@ -1338,8 +1338,8 @@ FILE *outf; suf = EFHNToStr(suffix); if (fetInfo[type].defSubs && strcasecmp(suf,fetInfo[type].defSubs) == 0) { l = strlen(suf) - 1; - if ( ( EFOutputFlags & EF_TRIMGLOB ) && suf[l] =='!' || - ( EFOutputFlags & EF_TRIMLOCAL ) && suf[l] == '#' ) + if ( (( EFOutputFlags & EF_TRIMGLOB ) && suf[l] =='!') || + (( EFOutputFlags & EF_TRIMLOCAL ) && suf[l] == '#') ) suf[l] = '\0' ; if ( esFormat == SU ) fprintf(outf, "S_"); diff --git a/ext2spice/ext2hier.c b/ext2spice/ext2hier.c index 543d3dbf..42d6786d 100644 --- a/ext2spice/ext2hier.c +++ b/ext2spice/ext2hier.c @@ -1409,7 +1409,7 @@ spcnodeHierVisit(hc, node, res, cap) hierName = (HierName *) node->efnode_name->efnn_hier; nsn = nodeSpiceHierName(hc, hierName); - if (esFormat == SPICE2 || esFormat == HSPICE && !strncmp(nsn, "z@", 2)) { + if (esFormat == SPICE2 || (esFormat == HSPICE && !strncmp(nsn, "z@", 2))) { static char ntmp[MAX_STR_SIZE]; EFHNSprintf(ntmp, hierName); diff --git a/ext2spice/ext2spice.c b/ext2spice/ext2spice.c index 45cc93be..d9d56954 100644 --- a/ext2spice/ext2spice.c +++ b/ext2spice/ext2spice.c @@ -169,8 +169,8 @@ esFormatSubs(outf, suf) if (outf) { l = strlen(suf) - 1; - if ((EFOutputFlags & EF_TRIMGLOB ) && suf[l] == '!' || - (EFOutputFlags & EF_TRIMLOCAL) && suf[l] == '#') + if (((EFOutputFlags & EF_TRIMGLOB ) && suf[l] == '!') || + ((EFOutputFlags & EF_TRIMLOCAL) && suf[l] == '#')) suf[l] = '\0' ; if (EFOutputFlags & EF_CONVERTCOMMA) while ((specchar = strchr(suf, ',')) != NULL) @@ -3652,7 +3652,7 @@ spcnodeVisit(node, res, cap) hierName = (HierName *) node->efnode_name->efnn_hier; nsn = nodeSpiceName(hierName, NULL); - if (esFormat == SPICE2 || esFormat == HSPICE && strncmp(nsn, "z@", 2)==0 ) { + if (esFormat == SPICE2 || (esFormat == HSPICE && strncmp(nsn, "z@", 2)==0 )) { static char ntmp[MAX_STR_SIZE]; EFHNSprintf(ntmp, hierName); diff --git a/gcr/gcrDebug.c b/gcr/gcrDebug.c index de233897..146b2ff9 100644 --- a/gcr/gcrDebug.c +++ b/gcr/gcrDebug.c @@ -635,7 +635,7 @@ void gcrPrintCol(ch, i, showResult) } else TxPrintf("#"); } - else if ((res[i][j] & GCRU) || j != 0 && (res[i][j-1] & GCRU)) + else if ((res[i][j] & GCRU) || (j != 0 && (res[i][j-1] & GCRU))) { if((res[i][j]&GCRCC) && (!(res[i][j]&(GCRBLKM|GCRBLKP)))) { diff --git a/resis/ResMakeRes.c b/resis/ResMakeRes.c index 4feeeb07..5a5ff1ad 100644 --- a/resis/ResMakeRes.c +++ b/resis/ResMakeRes.c @@ -667,11 +667,11 @@ ResCalcNearDevice(tile, pendingList, doneList, resList) /* 2. There are devices along two sides at right angles, */ /* and the tile is wider than it is tall. */ - if ((devedge & TOPEDGE) && (devedge & BOTTOMEDGE) && - !(devedge & LEFTEDGE) && !(devedge & RIGHTEDGE) || - (devedge & TOPEDGE || devedge & BOTTOMEDGE) && + if (((devedge & TOPEDGE) && (devedge & BOTTOMEDGE) && + !(devedge & LEFTEDGE) && !(devedge & RIGHTEDGE)) || + ((devedge & TOPEDGE || devedge & BOTTOMEDGE) && (devedge & LEFTEDGE || devedge & RIGHTEDGE) && - (RIGHT(tile) - LEFT(tile)) > (TOP(tile) - BOTTOM(tile))) + (RIGHT(tile) - LEFT(tile)) > (TOP(tile) - BOTTOM(tile)))) { /* re-sort nodes south to north. */ ResSortBreaks(&junk->breakList, FALSE); @@ -939,8 +939,8 @@ ResSortBreaks(masterlist, xsort) p3 = p2->br_next; while (p3 != NULL) { - if (xsort == TRUE && p2->br_loc.p_x > p3->br_loc.p_x || - xsort == FALSE && p2->br_loc.p_y > p3->br_loc.p_y) + if ((xsort == TRUE && p2->br_loc.p_x > p3->br_loc.p_x) || + (xsort == FALSE && p2->br_loc.p_y > p3->br_loc.p_y)) { changed = TRUE; if (p1 == NULL) diff --git a/resis/ResRex.c b/resis/ResRex.c index a2fe3a97..3c5749eb 100644 --- a/resis/ResRex.c +++ b/resis/ResRex.c @@ -1033,9 +1033,9 @@ ResCheckSimNodes(celldef, resisdata) ResFHFile = NULL; } - if (ResExtFile == NULL && (ResOptionsFlags & ResOpt_DoExtFile) - || (ResOptionsFlags & ResOpt_DoLumpFile) && ResLumpFile == NULL - || (ResOptionsFlags & ResOpt_FastHenry) && ResFHFile == NULL) + if ((ResExtFile == NULL && (ResOptionsFlags & ResOpt_DoExtFile)) + || ((ResOptionsFlags & ResOpt_DoLumpFile) && ResLumpFile == NULL) + || ((ResOptionsFlags & ResOpt_FastHenry) && ResFHFile == NULL)) { TxError("Couldn't open output file\n"); return; diff --git a/resis/ResSimple.c b/resis/ResSimple.c index b0f7aae9..3e87d673 100644 --- a/resis/ResSimple.c +++ b/resis/ResSimple.c @@ -198,8 +198,8 @@ ResSimplifyNet(nodelist, biglist, reslist, tolerance) * Break loop here. More than one driver indicates a loop; * remove deadend, allowing drivers to be merged */ - else if (UnMarkedReceivers == 0 && (MarkedReceivers == 1 && - NumberOfDrivers > 1 || resistor2 != resistor1)) + else if (UnMarkedReceivers == 0 && ((MarkedReceivers == 1 && + NumberOfDrivers > 1) || resistor2 != resistor1)) { otherNode->rn_float.rn_area += resistor1->rr_float.rr_area; diff --git a/select/selEnum.c b/select/selEnum.c index b59b0964..8cb6e7ec 100644 --- a/select/selEnum.c +++ b/select/selEnum.c @@ -320,8 +320,8 @@ selEnumPFunc2(tile, arg) /* Also okay if the X over Y yields a stacking type whose residues */ /* are X and Y. */ - if ((ttype != seltype) && (((ttype == TT_SPACE) && - TTMaskHasType(&DBHomePlaneTypes[arg->sea_plane], seltype))) || + if (((ttype != seltype) && (((ttype == TT_SPACE) && + TTMaskHasType(&DBHomePlaneTypes[arg->sea_plane], seltype)))) || (DBPaintResultTbl[arg->sea_plane][ttype][seltype] != seltype)) { TileType chktype = DBPaintResultTbl[arg->sea_plane][ttype][seltype];