Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
From: Corinna Vinschen <cygwin@cygwin.com>
Date: Thu, 7 Dec 2000 16:46:14 +0100
X-Mailer: KMail [version 1.1.99]
Content-Type: text/plain;
  charset="us-ascii"
To: cygwin@cygwin.com
References: <Pine.SOL.3.91.1001205145615.26082A-100000@cse.cygnus.com> <5.0.0.25.0.20001206202732.02a2f640@pop.bresnanlink.net> <5.0.0.25.0.20001207090607.028cc290@pop.bresnanlink.net>
In-Reply-To: <5.0.0.25.0.20001207090607.028cc290@pop.bresnanlink.net>
Subject: Re: [patch] default homedir (was: Re: Problem withssh-keygen.exe.
MIME-Version: 1.0
Message-Id: <00120716461402.03851@cobold>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id KAA31308

On Thursday 07 December 2000 16:15, Chris Abbey wrote:
> >- 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?

I'm not quite sure what line you're referring to. The code was
like that:

	char x[100];

	...
	if (strlen(x) == 0)
	  strcpy(x, "foo");

So, if the option -p wasn't given, your code relied on the
illegal assumption that the data space of an automatic var
is filled with 0 bytes. The result was that `passed_home_path'
was uninitialized when `-p' wasn't given and the strlen
returned 0 only in 1 of 256 cases...

>
> >- 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?

Nope. The problem is that the file isn't consistantly maintained
by people with the same style. This is a general problem in OS
projects. Sometimes a patch is checked in without care for the
style, sometimes it's forced by a maintainer, sometimes the
maintainer uses it's own style ignoring the coding standard.
A problem of confirmed habits... and I'm definitely not free of
them.

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

Yep.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.
mailto:vinschen@redhat.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

