[riot-notifications] [RIOT-OS/RIOT] shell/sc_gnrc_ipv6_nib: extend for ABR (#10951)

benpicco notifications at github.com
Wed Sep 11 23:23:17 CEST 2019


benpicco commented on this pull request.



> @@ -344,8 +344,8 @@ static int _nib_abr(int argc, char **argv)
             printf("address %s must be global\n", argv[3]);
             return 1;
         }
-        if (((netif = gnrc_netif_get_by_ipv6_addr(&addr)) == NULL) ||
-            gnrc_netif_is_6lbr(netif)) {
+        if (!(((netif = gnrc_netif_get_by_ipv6_addr(&addr)) != NULL) &&
+              gnrc_netif_is_6lbr(netif))) {

I'm pretty sure that `!(!a && b)` can be simplified to `a || !b`.

It was easier to understand before:
 - `gnrc_netif_get_by_ipv6_addr(&addr) == NULL` -> error OR
 - `!gnrc_netif_is_6lbr(netif)` -> error

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/10951#pullrequestreview-287081936
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190911/f106fa5f/attachment.htm>


More information about the notifications mailing list