summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dir.c2
-rw-r--r--ext/openssl/openssl_missing.h2
-rw-r--r--ext/openssl/ossl_ssl.c4
-rw-r--r--win32/win32.c3
4 files changed, 7 insertions, 4 deletions
diff --git a/dir.c b/dir.c
index 2c1116eea9..c8aa40099b 100644
--- a/dir.c
+++ b/dir.c
@@ -177,7 +177,7 @@ has_nonascii(const char *ptr, size_t len)
#endif
#ifndef IFTODT
-# define IFTODT(m) (((m) & S_IFMT) / ((~S_IFMT & S_IFMT-1) + 1))
+# define IFTODT(m) (((m) & S_IFMT) / ((~S_IFMT & (S_IFMT-1)) + 1))
#endif
typedef enum {
diff --git a/ext/openssl/openssl_missing.h b/ext/openssl/openssl_missing.h
index 69a7df71d0..09998214e1 100644
--- a/ext/openssl/openssl_missing.h
+++ b/ext/openssl/openssl_missing.h
@@ -185,7 +185,7 @@ IMPL_KEY_ACCESSOR3(DSA, pqg, p, q, g, (p == obj->p || q == obj->q || g == obj->g
#if !defined(OPENSSL_NO_DH)
IMPL_PKEY_GETTER(DH, dh)
IMPL_KEY_ACCESSOR2(DH, key, pub_key, priv_key, (pub_key == obj->pub_key || (obj->priv_key && priv_key == obj->priv_key)))
-IMPL_KEY_ACCESSOR3(DH, pqg, p, q, g, (p == obj->p || obj->q && q == obj->q || g == obj->g))
+IMPL_KEY_ACCESSOR3(DH, pqg, p, q, g, (p == obj->p || (obj->q && q == obj->q) || g == obj->g))
static inline ENGINE *DH_get0_engine(DH *dh) { return dh->engine; }
#endif
diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c
index a85be17f07..7996f227b6 100644
--- a/ext/openssl/ossl_ssl.c
+++ b/ext/openssl/ossl_ssl.c
@@ -184,8 +184,10 @@ ossl_sslctx_set_minmax_proto_version(VALUE self, VALUE min_v, VALUE max_v)
for (i = 0; i < numberof(options_map); i++) {
sum |= options_map[i].opts;
- if (min && min > options_map[i].ver || max && max < options_map[i].ver)
+ if ((min && min > options_map[i].ver) ||
+ (max && max < options_map[i].ver)) {
opts |= options_map[i].opts;
+ }
}
SSL_CTX_clear_options(ctx, sum);
SSL_CTX_set_options(ctx, opts);
diff --git a/win32/win32.c b/win32/win32.c
index 52de2cc63d..c76d43d384 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -6686,7 +6686,8 @@ constat_apply(HANDLE handle, struct constat *s, WCHAR w)
COORD pos;
if (!GetConsoleScreenBufferInfo(handle, &csbi)) return;
- if (arg0 = (count > 0 && seq[0] > 0)) arg1 = seq[0];
+ arg0 = (count > 0 && seq[0] > 0);
+ if (arg0) arg1 = seq[0];
switch (w) {
case L'm':
SetConsoleTextAttribute(handle, constat_attr(count, seq, csbi.wAttributes, s->vt100.attr, &s->vt100.reverse));