Re: Fixing gcc 3.3 compile failures -- fix for net/netsaint-plugins

From: Jacques A. Vidrine <nectar_at_FreeBSD.org>
Date: Tue, 22 Jul 2003 19:18:22 -0500
On Wed, Jul 23, 2003 at 01:57:56AM +0200, Simon Barner wrote:
> > > --- plugins/check_by_ssh.c.orig	Mon Apr 23 09:43:11 2001
> > > +++ plugins/check_by_ssh.c	Tue Jul 22 05:05:52 2003
> > > _at__at_ -191,7 +191,7 _at__at_
> > >  	if (commands>1)
> > >  		remotecmd=strscat(remotecmd,";echo STATUS CODE: $?;");
> > >  
> > > -	if (strlen (remotecmd) <= 1)
> > > +	if (remotecmd==NULL)
> > >  		usage ("No remotecmd\n");
> > >  
> > >  	comm = ssprintf(comm,"%s %s '%s'",comm,hostname,remotecmd);
> > 
> > This looks like more than a fix for a `compile failure'.  The
> > replacement code has different semantics than the new code.
> > What is the `compile failure' that was being fixed here?
> 
> I don't know, either. This patch was part of the port before I touched
> it [1]. 

Oh, well nevermind!  I thought this was a new patch to deal with
`compile failures'.  Cheers!

> Perhaps one should write
> 
> if ((remotecmd==NULL) || (strlen (remotecmd) <= 1))
> 
> to be on the safe side?

Maybe.  The original submittor might recall.

Cheers,
-- 
Jacques Vidrine   . NTT/Verio SME      . FreeBSD UNIX       . Heimdal
nectar_at_celabo.org . jvidrine_at_verio.net . nectar_at_freebsd.org . nectar_at_kth.se
Received on Tue Jul 22 2003 - 15:18:24 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:16 UTC