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

Martine Lenders notifications at github.com
Wed Sep 11 23:34:57 CEST 2019


miri64 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`.

See comments after https://github.com/RIOT-OS/RIOT/pull/10951#discussion_r323467893. The formular actually now is `!(a && b)`, so with an `||` it would become a double negation `!a || !b`.

-- 
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#discussion_r323470123
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190911/c23f759c/attachment.htm>


More information about the notifications mailing list