summary refs log tree commit diff
path: root/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'client.c')
-rw-r--r--client.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/client.c b/client.c
index 81b2d9e..4a5d0c8 100644
--- a/client.c
+++ b/client.c
@@ -781,12 +781,10 @@ client_applysizehints(struct client_ctx *cc)
 	}
 
 	/* adjust for aspect limits */
-	if (cc->hint.mina > 0 && cc->hint.maxa > 0) {
-		if (cc->hint.maxa <
-		    (float)cc->geom.w / cc->geom.h)
+	if (cc->hint.mina && cc->hint.maxa) {
+		if (cc->hint.maxa < (float)cc->geom.w / cc->geom.h)
 			cc->geom.w = cc->geom.h * cc->hint.maxa;
-		else if (cc->hint.mina <
-		    (float)cc->geom.h / cc->geom.w)
+		else if (cc->hint.mina < (float)cc->geom.h / cc->geom.w)
 			cc->geom.h = cc->geom.w * cc->hint.mina;
 	}