Skip to content

Commit

Permalink
ofpbuf: Correct comments for ofpbuf_tail and ofpbuf_end().
Browse files Browse the repository at this point in the history
The return type of ofpbuf_tail() and ofpbuf_end() is pointer, not byte.

Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
  • Loading branch information
Wang Sheng-Hui authored and blp committed Oct 6, 2014
1 parent be58167 commit 058322c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/ofpbuf.h
Expand Up @@ -203,14 +203,14 @@ static inline void *ofpbuf_at_assert(const struct ofpbuf *b, size_t offset,
return ((char *) ofpbuf_data(b)) + offset;
}

/* Returns the byte following the last byte of data in use in 'b'. */
/* Returns a pointer to byte following the last byte of data in use in 'b'. */
static inline void *ofpbuf_tail(const struct ofpbuf *b)
{
return (char *) ofpbuf_data(b) + ofpbuf_size(b);
}

/* Returns the byte following the last byte allocated for use (but not
* necessarily in use) by 'b'. */
/* Returns a pointer to byte following the last byte allocated for use (but
* not necessarily in use) in 'b'. */
static inline void *ofpbuf_end(const struct ofpbuf *b)
{
return (char *) ofpbuf_base(b) + b->allocated;
Expand Down

0 comments on commit 058322c

Please sign in to comment.