apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: [PATCH] apr_file_t->fname for a pipe
Date Mon, 23 Jul 2001 17:26:30 GMT
From: "Jeff Trawick" <trawick@attglobal.net>
Sent: Monday, July 23, 2001 12:07 PM


> "William A. Rowe, Jr." <wrowe@rowe-clan.net> writes:
> 
> > From: "Jeff Trawick" <trawick@attglobal.net>
> > Sent: Monday, July 23, 2001 11:23 AM
> > ;dev
> > 
> > > apr_pipe_create() sets apr_file_t->fname to
> > > 
> > >   apr_pstrdup(p, "PIPE")
> > > 
> > >   (why not just "")
> > > 
> > > Why not leave it NULL?  I don't see any code to retrieve it.
> > > Presumably if somebody is looking at the structure in memory they'll
> > > realize that NULL is okay since it is a pipe.
> > 
> > I made this change to the win32 code some time back.  No adverse affects :)
> > Feel free to just port that change forward, it's silly to put a string
> > identifier that is so out-of-context and invalid.
> 
> Why did you make it "" instead of NULL?
> 
> I don't see any reason why it shouldn't be NULL.

Because it could cause a segfault if the user doesn't expect to receive a ...



... uh, ok, make them all NULL :)



Mime
View raw message