apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Saxon Druce" <sa...@blocksoftware.com>
Subject Re: [PATCH] filepath.c with Borland C++ Builder
Date Wed, 25 Jun 2003 06:46:32 GMT
----- Original Message -----
From: "Brian Pane" <brianp@apache.org>
To: "APR dev" <dev@apr.apache.org>
Sent: Wednesday, June 25, 2003 2:42 PM
Subject: Re: [PATCH] filepath.c with Borland C++ Builder


> Saxon Druce wrote:
>
> >--- apr/file_io/win32/filepath.c.old    Tue May 13 14:35:32 2003
> >+++ apr/file_io/win32/filepath.c        Tue May 13 14:38:31 2003
> >@@ -156,9 +156,11 @@
> >
> > #else /* ndef(NETWARE) */
> >
> >-    char seperator[2] = { (flags & APR_FILEPATH_NATIVE) ? '\\' : '/',
0};
> >+    char seperator[2] = {0, 0};
> >     const char *delim1;
> >     const char *delim2;
> >+
> >+    seperator[0] = (flags & APR_FILEPATH_NATIVE) ? '\\' : '/';
> >
> >     if (testpath[0] == '/' || testpath[0] == '\\') {
> >         if (testpath[1] == '/' || testpath[1] == '\\') {
> >
> >
>
> The change makes sense, but why initialize separator only
> to overwrite it?  I.e., why not:
>     char separator[2];
>     const char *delim1;
>     const char *delim2;
>
>     seperator[0] = (flags & APR_FILEPATH_NATIVE) ? '\\' : '/';
>     separator[1] = 0;

I copied the method used for the #ifdef NETWARE case further up in the
function. I can change it though and submit a new patch if that would give
it a better chance of being applied?

Thanks,
Saxon


Mime
View raw message