summaryrefslogtreecommitdiffstats
path: root/bin/expr/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/expr/expr.c')
-rw-r--r--bin/expr/expr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/expr/expr.c b/bin/expr/expr.c
index acfebe3cc68..b22268d5141 100644
--- a/bin/expr/expr.c
+++ b/bin/expr/expr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: expr.c,v 1.24 2016/01/06 17:53:14 tedu Exp $ */
+/* $OpenBSD: expr.c,v 1.25 2016/01/07 21:17:05 tedu Exp $ */
/* $NetBSD: expr.c,v 1.3.6.1 1996/06/04 20:41:47 cgd Exp $ */
/*
@@ -7,6 +7,7 @@
*/
#include <stdio.h>
+#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
@@ -331,10 +332,10 @@ eval4(void)
errx(2, "division by zero");
}
if (op == DIV) {
- if (l->u.i != INT_MIN || r->u.i != -1)
+ if (l->u.i != INT64_MIN || r->u.i != -1)
l->u.i /= r->u.i;
} else {
- if (l->u.i != INT_MIN || r->u.i != -1)
+ if (l->u.i != INT64_MIN || r->u.i != -1)
l->u.i %= r->u.i;
else
l->u.i = 0;