use hasbit() to test for invert flag of weekdays and monthdays
authorJo-Philipp Wich <jow@openwrt.org>
Thu, 21 Feb 2013 22:59:06 +0000 (23:59 +0100)
committerJo-Philipp Wich <jow@openwrt.org>
Thu, 21 Feb 2013 22:59:06 +0000 (23:59 +0100)
options.c

index 9870e91ac522f791bbc4006e01d4b079c6c3bcb8..d924a2af33aa28b0555739eb10d213ad25942e67 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++)
                {