Skip to content

Commit

Permalink
ustream-example: fix container_of type errors
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Fietkau <[email protected]>
  • Loading branch information
Felix Fietkau committed May 8, 2013
1 parent ecee1a3 commit 3ceb819
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/ustream-example.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ struct client {

static void client_read_cb(struct ustream *s, int bytes)
{
struct client *cl = container_of(s, struct client, s);
struct client *cl = container_of(s, struct client, s.stream);
struct ustream_buf *buf = s->r.head;
char *newline, *str;

Expand All @@ -50,7 +50,7 @@ static void client_read_cb(struct ustream *s, int bytes)

static void client_close(struct ustream *s)
{
struct client *cl = container_of(s, struct client, s);
struct client *cl = container_of(s, struct client, s.stream);

fprintf(stderr, "Connection closed\n");
ustream_free(s);
Expand All @@ -70,7 +70,7 @@ static void client_notify_write(struct ustream *s, int bytes)

static void client_notify_state(struct ustream *s)
{
struct client *cl = container_of(s, struct client, s);
struct client *cl = container_of(s, struct client, s.stream);

if (!s->eof)
return;
Expand Down

0 comments on commit 3ceb819

Please sign in to comment.