From: Jo-Philipp Wich Date: Thu, 21 Feb 2013 22:59:06 +0000 (+0100) Subject: use hasbit() to test for invert flag of weekdays and monthdays X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6c5c240d7a1710c53e7a18af6612404753729cf7;p=oweals%2Ffirewall3.git use hasbit() to test for invert flag of weekdays and monthdays --- diff --git a/options.c b/options.c index 9870e91..d924a2a 100644 --- a/options.c +++ b/options.c @@ -1014,7 +1014,7 @@ fw3_format_time(struct fw3_time *time) if (time->monthdays & 0xFFFFFFFE) { - fw3_pr(" %s--monthdays", (time->monthdays & 1) ? "! " : ""); + fw3_pr(" %s--monthdays", hasbit(time->monthdays, 0) ? "! " : ""); for (i = 1, first = true; i < 32; i++) { @@ -1028,7 +1028,7 @@ fw3_format_time(struct fw3_time *time) if (time->weekdays & 0xFE) { - fw3_pr(" %s--weekdays", (time->weekdays & 1) ? "! " : ""); + fw3_pr(" %s--weekdays", hasbit(time->weekdays, 0) ? "! " : ""); for (i = 1, first = true; i < 8; i++) {