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 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)
        {
 
        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++)
                {
 
                for (i = 1, first = true; i < 32; i++)
                {
@@ -1028,7 +1028,7 @@ fw3_format_time(struct fw3_time *time)
 
        if (time->weekdays & 0xFE)
        {
 
        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++)
                {
 
                for (i = 1, first = true; i < 8; i++)
                {