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:[EMAIL PROTECTED]
Red Hat, Inc.
mailto:[EMAIL PROTECTED]

--
Want to unsubscribe from this list?
Send a message to [EMAIL PROTECTED]

Reply via email to