Skip to content
Snippets Groups Projects
Commit 655981af authored by Martin Nilsson's avatar Martin Nilsson
Browse files

Fix warnings.

Rev: src/post_modules/Shuffler/d_source_pikestream.c:1.8
Rev: src/post_modules/Shuffler/e_source_block_pikestream.c:1.6
parent fc5b3f3d
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
|| This file is part of Pike. For copyright information see COPYRIGHT. || This file is part of Pike. For copyright information see COPYRIGHT.
|| Pike is distributed under GPL, LGPL and MPL. See the file COPYING || Pike is distributed under GPL, LGPL and MPL. See the file COPYING
|| for more information. || for more information.
|| $Id: d_source_pikestream.c,v 1.7 2004/10/16 07:27:29 agehall Exp $ || $Id: d_source_pikestream.c,v 1.8 2007/11/10 21:23:02 nilsson Exp $
*/ */
#include "global.h" #include "global.h"
...@@ -72,7 +72,7 @@ static void remove_callbacks( struct source *_s ) ...@@ -72,7 +72,7 @@ static void remove_callbacks( struct source *_s )
static struct data get_data( struct source *_s, off_t len ) static struct data get_data( struct source *_s, off_t len )
{ {
struct pf_source *s = (struct pf_source *)_s; struct pf_source *s = (struct pf_source *)_s;
struct data res; struct data res = { 0, 0, 0, NULL };
char *buffer = NULL; char *buffer = NULL;
if( s->str ) if( s->str )
...@@ -83,10 +83,7 @@ static struct data get_data( struct source *_s, off_t len ) ...@@ -83,10 +83,7 @@ static struct data get_data( struct source *_s, off_t len )
if( s->skip >= (size_t)s->str->len ) if( s->skip >= (size_t)s->str->len )
{ {
s->skip -= (size_t)s->str->len; s->skip -= (size_t)s->str->len;
res.do_free = 0;
res.data = 0;
res.len = -2; res.len = -2;
res.off = 0;
return res; return res;
} }
len -= s->skip; len -= s->skip;
...@@ -109,7 +106,6 @@ static struct data get_data( struct source *_s, off_t len ) ...@@ -109,7 +106,6 @@ static struct data get_data( struct source *_s, off_t len )
res.data = buffer; res.data = buffer;
res.len = len; res.len = len;
res.do_free = 1; res.do_free = 1;
res.off = 0;
free_string( s->str ); free_string( s->str );
s->str = 0; s->str = 0;
setup_callbacks( _s ); setup_callbacks( _s );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
|| This file is part of Pike. For copyright information see COPYRIGHT. || This file is part of Pike. For copyright information see COPYRIGHT.
|| Pike is distributed under GPL, LGPL and MPL. See the file COPYING || Pike is distributed under GPL, LGPL and MPL. See the file COPYING
|| for more information. || for more information.
|| $Id: e_source_block_pikestream.c,v 1.5 2004/10/16 07:27:29 agehall Exp $ || $Id: e_source_block_pikestream.c,v 1.6 2007/11/10 21:23:14 nilsson Exp $
*/ */
#include "global.h" #include "global.h"
...@@ -35,11 +35,7 @@ struct pf_source ...@@ -35,11 +35,7 @@ struct pf_source
static struct data get_data( struct source *_s, off_t len ) static struct data get_data( struct source *_s, off_t len )
{ {
struct pf_source *s = (struct pf_source *)_s; struct pf_source *s = (struct pf_source *)_s;
struct data res; struct data res = { 0, 0, 0, NULL };
res.len = 0;
res.off = 0;
res.do_free = 0;
if( s->len>0 && len > s->len ) { if( s->len>0 && len > s->len ) {
len = s->len; len = s->len;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment