]> diplodocus.org Git - nmh/commitdiff
uip/aliasbr.c: Add FIXME to prove test of add()'s return value.
authorRalph Corderoy <ralph@inputplus.co.uk>
Sun, 16 Apr 2017 22:36:07 +0000 (23:36 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Sun, 16 Apr 2017 22:36:07 +0000 (23:36 +0100)
add() always returns true so perhaps some other test is intended
instead.

uip/aliasbr.c

index 015f48a..0c1c6ba 100644 (file)
@@ -132,6 +132,8 @@ akval (struct aka *ak, char *s)
                if (mp  &&  mp->m_ingrp) {
                    char *gname = add (mp->m_gname, NULL);
 
                if (mp  &&  mp->m_ingrp) {
                    char *gname = add (mp->m_gname, NULL);
 
+                    /* FIXME: gname must be true;  add() never returns NULL.
+                    * Is some other test required? */
                    if (gname  &&  aleq (name, ak->ak_name)) {
                        /* Will leak cp. */
                        cp = concat (gname, akresult (ak), NULL);
                    if (gname  &&  aleq (name, ak->ak_name)) {
                        /* Will leak cp. */
                        cp = concat (gname, akresult (ak), NULL);