From owner-freebsd-bugs Thu Feb 20 15:30:05 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id PAA15425 for bugs-outgoing; Thu, 20 Feb 1997 15:30:05 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id PAA15418; Thu, 20 Feb 1997 15:30:03 -0800 (PST) Resent-Date: Thu, 20 Feb 1997 15:30:03 -0800 (PST) Resent-Message-Id: <199702202330.PAA15418@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, mpp@freebsd.org Received: (from mpp@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id PAA14789; Thu, 20 Feb 1997 15:22:06 -0800 (PST) Message-Id: <199702202322.PAA14789@freefall.freebsd.org> Date: Thu, 20 Feb 1997 15:22:06 -0800 (PST) From: mpp@freebsd.org Reply-To: mpp@freebsd.org To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/2785: callbootd uses an unitialized variable Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >Number: 2785 >Category: bin >Synopsis: callbootd uses an unitialized variable >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Feb 20 15:30:01 PST 1997 >Last-Modified: >Originator: Mike Pritchard >Organization: Mike Pritchard >Release: FreeBSD 3.0-current >Environment: >Description: While apply another coesmetic patch to bootparamd/callbootd, I noticed that callbootd uses an unitialized variable. >How-To-Repeat: Compile bootparamd with COPTS=-Wall >Fix: I think the following patch should fix the problem, but someone who actually knows something about how bootparamd works should review it. Index: callbootd/callbootd.c =================================================================== RCS file: /home/ncvs/src/usr.sbin/bootparamd/callbootd/callbootd.c,v retrieving revision 1.4 diff -u -r1.4 callbootd.c --- callbootd.c 1997/01/14 07:10:38 1.4 +++ callbootd.c 1997/02/20 23:16:30 @@ -88,12 +88,11 @@ if ( ! broadcast ) { clnt = clnt_create(server,BOOTPARAMPROG, BOOTPARAMVERS, "udp"); - } - - if ( clnt == NULL ) { - fprintf (stderr, "%s: could not contact bootparam server on host %s\n", + if ( clnt == NULL ) { + fprintf (stderr, "%s: could not contact bootparam server on host %s\n", argv[0], server); - exit (1); + exit (1); + } } switch (argc) { >Audit-Trail: >Unformatted: