use hasbit() to test for invert flag of weekdays and monthdays
[project/firewall3.git] / options.c
index 9870e91..d924a2a 100644 (file)
--- 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++)
                {