Module Name: src Committed By: rillig Date: Sat Aug 28 16:51:57 UTC 2021
Modified Files: src/usr.bin/xlint/lint1: tree.c Log Message: lint: remove double inversion from is_out_of_char_range No functional change. To generate a diff of this commit: cvs rdiff -u -r1.359 -r1.360 src/usr.bin/xlint/lint1/tree.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/xlint/lint1/tree.c diff -u src/usr.bin/xlint/lint1/tree.c:1.359 src/usr.bin/xlint/lint1/tree.c:1.360 --- src/usr.bin/xlint/lint1/tree.c:1.359 Sat Aug 28 16:43:50 2021 +++ src/usr.bin/xlint/lint1/tree.c Sat Aug 28 16:51:57 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: tree.c,v 1.359 2021/08/28 16:43:50 rillig Exp $ */ +/* $NetBSD: tree.c,v 1.360 2021/08/28 16:51:57 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include <sys/cdefs.h> #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: tree.c,v 1.359 2021/08/28 16:43:50 rillig Exp $"); +__RCSID("$NetBSD: tree.c,v 1.360 2021/08/28 16:51:57 rillig Exp $"); #endif #include <float.h> @@ -4102,8 +4102,8 @@ static bool is_out_of_char_range(const tnode_t *tn) { return tn->tn_op == CON && - (tn->tn_val->v_quad < 0 || - tn->tn_val->v_quad > (int)~(~0U << (CHAR_SIZE - 1))); + !(0 <= tn->tn_val->v_quad && + tn->tn_val->v_quad < 1 << (CHAR_SIZE - 1)); } /*