diff --git a/src/backend/utils/adt/int8.c b/src/backend/utils/adt/int8.c
index a8e2200..709cf7c 100644
--- a/src/backend/utils/adt/int8.c
+++ b/src/backend/utils/adt/int8.c
@@ -113,21 +113,19 @@ scanint8(const char *str, bool errorOK, int64 *result)
 	return true;
 
 out_of_range:
-	if (errorOK)
-		return false;
-	else
+	if (!errorOK)
 		ereport(ERROR,
 				(errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
 				 errmsg("value \"%s\" is out of range for type %s",
 						str, "bigint")));
+	return false;
 invalid_syntax:
-	if (errorOK)
-		return false;
-	else
+	if (!errorOK)
 		ereport(ERROR,
 				(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
 				 errmsg("invalid input syntax for integer: \"%s\"",
 						str)));
+	return false;
 }
 
 /* int8in()
