[ovs-dev] [PATCH] lib/ofpbuf.h: correct comments for ofpbuf_tail and ofpbuf_end

Wang Sheng-Hui shhuiw at gmail.com
Sat Oct 4 01:22:23 UTC 2014


The return type of ofpbuf_tail and ofpbuf_end is pointer, not byte.

Signed-off-by: Wang Sheng-Hui <shhuiw at gmail.com>
---
 lib/ofpbuf.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/ofpbuf.h b/lib/ofpbuf.h
index adaf526..53c43fb 100644
--- a/lib/ofpbuf.h
+++ b/lib/ofpbuf.h
@@ -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;
-- 
1.8.3.2



More information about the dev mailing list