From owner-freebsd-current Fri Apr 3 16:28:32 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA05075 for freebsd-current-outgoing; Fri, 3 Apr 1998 16:28:32 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from smtp01.primenet.com (smtp01.primenet.com [206.165.6.131]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA05065 for ; Fri, 3 Apr 1998 16:28:30 -0800 (PST) (envelope-from tlambert@usr06.primenet.com) Received: (from daemon@localhost) by smtp01.primenet.com (8.8.8/8.8.8) id RAA26851 for ; Fri, 3 Apr 1998 17:28:28 -0700 (MST) Received: from usr06.primenet.com(206.165.6.206) via SMTP by smtp01.primenet.com, id smtpd026823; Fri Apr 3 17:28:18 1998 Received: (from tlambert@localhost) by usr06.primenet.com (8.8.5/8.8.5) id RAA13922 for current@freebsd.org; Fri, 3 Apr 1998 17:28:17 -0700 (MST) From: Terry Lambert Message-Id: <199804040028.RAA13922@usr06.primenet.com> Subject: Another problem with getnetent(3)! To: current@FreeBSD.ORG Date: Sat, 4 Apr 1998 00:28:16 +0000 (GMT) X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Apparently, there is another problem. If I amend the previous code with: ... char **pp; while( ( nep = getnetent()) != NULL) { ... for( pp = nep->n_aliases; *pp != NULL; pp++) { printf( "alias %s\n", *pp); } printf( "\n"); } If I don't have an alias, then the last thing on the line (the IP address) is erroneously processed as an alias. This is wrong. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message