[vlc-devel] [PATCH] Fixes for a couple of issues spotted by clang
Fabian Keil
freebsd-listen at fabiankeil.de
Fri Jul 3 13:55:37 CEST 2009
Rémi Duraffort <ivoire at videolan.org> wrote:
> > Subject: [PATCH 2/5] In httpd_FileCallBack(), make sure p_body has a defined value.
> >
> > ---
> > src/network/httpd.c | 3 +--
> > 1 files changed, 1 insertions(+), 2 deletions(-)
> >
> > diff --git a/src/network/httpd.c b/src/network/httpd.c
> > index 7bfc071..4e849b8 100644
> > --- a/src/network/httpd.c
> > +++ b/src/network/httpd.c
> > @@ -398,7 +398,7 @@ httpd_FileCallBack( httpd_callback_sys_t *p_sys, httpd_client_t *cl,
> > httpd_message_t *answer, const httpd_message_t *query )
> > {
> > httpd_file_t *file = (httpd_file_t*)p_sys;
> > - uint8_t **pp_body, *p_body;
> > + uint8_t **pp_body, *p_body = NULL;
> > const char *psz_connection;
> > int *pi_body, i_body;
> >
> > @@ -423,7 +423,6 @@ httpd_FileCallBack( httpd_callback_sys_t *p_sys, httpd_client_t *cl,
> > else
> > {
> > /* The file still needs to be executed. */
> > - p_body = NULL;
> > i_body = 0;
> > pp_body = &p_body;
> > pi_body = &i_body;
> >
> I disagree for this one: p_body is used only if (query->i_type ==
> HTTPD_MSG_HEAD). In this case p_body is initialized with NULL in the
> else statement.
You're right, I missed that.
Fabian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20090703/a3b3659c/attachment.sig>
More information about the vlc-devel
mailing list