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

2003-07-22 Thread Simon Barner
--- 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
@@ -191,7 +191,7 @@
if (commands1)
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);
@@ -369,6 +369,8 @@
list of netsaint service names, separated by ':' [optional]\n
 -n, --name=NAME\n
short name of host in netsaint configuration [optional]\n
+-v, --verbose\n
+   short name of host in netsaint configuration [optional]\n
 \n
 The most common mode of use is to refer to a local identity file 
with\n
 the '-i' option. In this mode, the identity pair should have a 
null\n
@@ -388,7 +390,7 @@
 
 
 #define OPTIONS \
--H host [-P port] [-f] [-y] [-t timeout] [-i identity]\n
+-H host -C command [-fyv] [-P port] [-t timeout] [-i identity]\n\
  [-l user] [-n name] [-s servicelist] [-O outputfile]
 
 void print_usage(void)


signature.asc
Description: Digital signature


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

2003-07-22 Thread Jacques A. Vidrine
On Tue, Jul 22, 2003 at 02:26:08PM +0200, Simon Barner wrote:

 --- plugins/check_by_ssh.c.orig   Mon Apr 23 09:43:11 2001
 +++ plugins/check_by_ssh.cTue Jul 22 05:05:52 2003
 @@ -191,7 +191,7 @@
   if (commands1)
   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?

Cheers,
-- 
Jacques Vidrine   . NTT/Verio SME  . FreeBSD UNIX   . Heimdal
[EMAIL PROTECTED] . [EMAIL PROTECTED] . [EMAIL PROTECTED] . [EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to [EMAIL PROTECTED]


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

2003-07-22 Thread Thomas Dickey
On Tue, Jul 22, 2003 at 02:56:37PM -0500, Jacques A. Vidrine wrote:
 On Tue, Jul 22, 2003 at 02:26:08PM +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
  @@ -191,7 +191,7 @@
  if (commands1)
  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?

perhaps the compiler was pointing out that remotecmd may not be initialized.

(I don't see enough context to be sure ;-)

-- 
Thomas E. Dickey [EMAIL PROTECTED] [EMAIL PROTECTED]
http://dickey.his.com
ftp://dickey.his.com
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to [EMAIL PROTECTED]


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

2003-07-22 Thread Simon Barner
  --- 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
  @@ -191,7 +191,7 @@
  if (commands1)
  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]. Perhaps one should write

if ((remotecmd==NULL) || (strlen (remotecmd) = 1))

to be on the safe side?

Cheers,
 Simon
 
[1]:
http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/ports/net/netsaint-plugins/files/patch-check_by_ssh.c?rev=1.1content-type=text/plain


signature.asc
Description: Digital signature


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

2003-07-22 Thread Jacques A. Vidrine
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.cTue Jul 22 05:05:52 2003
   @@ -191,7 +191,7 @@
 if (commands1)
 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
[EMAIL PROTECTED] . [EMAIL PROTECTED] . [EMAIL PROTECTED] . [EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to [EMAIL PROTECTED]