From: Andre Date: Thu, 20 Apr 2006 18:06:20 +0000 (+0200) Subject: Simplify wng_write() X-Git-Tag: v0.2.12~36 X-Git-Url: http://git.tuebingen.mpg.de/?a=commitdiff_plain;ds=sidebyside;h=43d8fcca2bee25cf5c120e58406943fe8fc124ae;p=paraslash.git Simplify wng_write() by killing the variable "p" which is only used once. Fixes warning: pointer targets in passing argument 1 of 'wn->writer->write' differ in signedness --- diff --git a/write_common.c b/write_common.c index e496c26c..e76d7f46 100644 --- a/write_common.c +++ b/write_common.c @@ -35,7 +35,6 @@ int wng_write(struct writer_node_group *g, char *buf, size_t *loaded) need_more_writes = 0; FOR_EACH_WRITER_NODE(i, g) { size_t w = g->written[i]; - unsigned char *p = buf + w; int bytes_to_write; struct writer_node *wn = &g->writer_nodes[i]; if (!i) @@ -48,7 +47,7 @@ int wng_write(struct writer_node_group *g, char *buf, size_t *loaded) continue; bytes_to_write = PARA_MIN(wn->chunk_bytes, *loaded - w); - ret = wn->writer->write(p, bytes_to_write, wn); + ret = wn->writer->write(buf + w, bytes_to_write, wn); if (ret < 0) goto out; if (ret != bytes_to_write)