delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/12/07/10:19:08

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-Id: <5.0.0.25.0.20001207090607.028cc290@pop.bresnanlink.net>
X-Sender: cabbey AT pop DOT bresnanlink DOT net
X-Mailer: QUALCOMM Windows Eudora Version 5.0
Date: Thu, 07 Dec 2000 09:15:02 -0600
To: cygwin AT cygwin DOT com
From: Chris Abbey <cabbey AT bresnanlink DOT net>
Subject: Re: [patch] default homedir (was: Re: Problem
withssh-keygen.exe.
In-Reply-To: <3A2F6724.8808AEE5@redhat.com>
References: <Pine DOT SOL DOT 3 DOT 91 DOT 1001205145615 DOT 26082A-100000 AT cse DOT cygnus DOT com>
<5 DOT 0 DOT 0 DOT 25 DOT 0 DOT 20001205233111 DOT 027a5eb0 AT pop DOT bresnanlink DOT net>
<5 DOT 0 DOT 0 DOT 25 DOT 0 DOT 20001206202732 DOT 02a2f640 AT pop DOT bresnanlink DOT net>
Mime-Version: 1.0

At 11:32 12/7/00 +0100, Corinna Vinschen wrote:
>Personally I like   if (!strlen (foo))   much more.

the only reason I don't code that way is that this treats
an integer as a boolean. it is, imho, sloppy code.

>I have applied your patch but I have changed this and that:

thanks.

>- You have used `passed_home_path' uninitialized which resulted in
>   garbage in the output on my system when the `-p' option wasn't
>   given.

that was at line 393, the original strcpy, right? I thought
strcpy would effectively initialize it for us?

>- We are following the GNU coding convention in that a space should be

opps, another habit, again mental note made for future patches...
this particular file isn't exactly the model of consistent
formatting though, is it?

>- I have changed the `if (strlen (foo) == 0) conditionals to
>   `if (foo[0] == '\0')' which I personally prefer when checking
>   for len == 0.

true, can be faster, but relies on implementation knowledge,
from a pure software engineering approach this is dangerous;
but then the odds that "strings" will ever be changed away
from null terminated char arrays is what, about 0.0? ;)

>While incorporating your patch I found a typo in the longopts
>structure. I had once written "loca-group" instead of "local-group".
>I have fixed this in the same go.

amazing what you find occasionally isn't it.

>Thanks for contributing that patch,

no problem, I was part of the affected group, as were
people I know... don't ya just love open source. :)

now the forces of openness
     have a powerful and
     unexpected new ally
    http://ibm.com/linux/


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019