mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-06-30 19:12:48 -05:00
Remove three uses of bitwise ops on boolean values.
If values are boolean, it's confusing to use & and | in place of && and ||. In two of these three cases it was simply a typo and I've used the other one; in the third, it was a deliberate avoidance of short- circuit evaluation (and commented as such), but having seen how easy it is to make the same typo by accident, I've decided it's clearer to just move the LHS and RHS evaluations outside the expression.
This commit is contained in:
@ -407,7 +407,7 @@ static const char *gtk_askpass_setup(struct askpass_ctx *ctx,
|
||||
ctx->cols[2].red = ctx->cols[2].green = ctx->cols[2].blue = 0x8000;
|
||||
gdk_colormap_alloc_colors(ctx->colmap, ctx->cols, 2,
|
||||
FALSE, TRUE, success);
|
||||
if (!success[0] | !success[1])
|
||||
if (!success[0] || !success[1])
|
||||
return "unable to allocate colours";
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user