X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=ustream.c;h=8e6efcda43be5eca12d2dc8b4c131928be9d9123;hb=407f7a0bb3272ee03f2eb05391ce8b94238fa92e;hp=a58069dd1c2b21483c4780be06cb4da824c612a9;hpb=768a69b3cedfebde10825847e42f35ed4aee1856;p=project%2Flibubox.git diff --git a/ustream.c b/ustream.c index a58069d..8e6efcd 100644 --- a/ustream.c +++ b/ustream.c @@ -24,7 +24,7 @@ #include "ustream.h" -void ustream_init_buf(struct ustream_buf *buf, int len) +static void ustream_init_buf(struct ustream_buf *buf, int len) { if (!len) abort(); @@ -104,7 +104,8 @@ static void ustream_state_change_cb(struct uloop_timeout *t) if (s->write_error) ustream_free_buffers(&s->w); - s->notify_state(s); + if (s->notify_state) + s->notify_state(s); } void ustream_init_defaults(struct ustream *s) @@ -403,7 +404,7 @@ static int ustream_write_buffered(struct ustream *s, const char *data, int len, int ustream_write(struct ustream *s, const char *data, int len, bool more) { struct ustream_buf_list *l = &s->w; - int wr; + int wr = 0; if (s->write_error) return 0;