]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
df: tiny simplification
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 5 Jan 2022 22:35:31 +0000 (14:35 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 7 Jan 2022 22:56:55 +0000 (14:56 -0800)
* src/df.c (LOG_EQ): Remove.  All callers replaced by ==.

src/df.c

index bff932d76dc97aa89a433b35de2a44172035a668..b803fc73bafbb633a433349964c5a6b065a90b9f 100644 (file)
--- a/src/df.c
+++ b/src/df.c
@@ -906,9 +906,6 @@ df_readable (bool negative, uintmax_t n, char *buf,
     }
 }
 
-/* Logical equivalence */
-#define LOG_EQ(a, b) (!(a) == !(b))
-
 /* Add integral value while using uintmax_t for value part and separate
    negation flag.  It adds value of SRC and SRC_NEG to DEST and DEST_NEG.
    The result will be in DEST and DEST_NEG.  See df_readable to understand
@@ -917,7 +914,7 @@ static void
 add_uint_with_neg_flag (uintmax_t *dest, bool *dest_neg,
                         uintmax_t src, bool src_neg)
 {
-  if (LOG_EQ (*dest_neg, src_neg))
+  if (*dest_neg == src_neg)
     {
       *dest += src;
       return;