From 5e00e06129a497cfb8b82e6756cf0800e7c57bb2 Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Tue, 15 Jan 2008 06:36:54 +0000 Subject: [PATCH] Comment and errno changes --- lib/silcutil/silcbuffer.h | 8 ++++---- lib/silcutil/silcbuffmt.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/silcutil/silcbuffer.h b/lib/silcutil/silcbuffer.h index 6edf2b99..dc9d405c 100644 --- a/lib/silcutil/silcbuffer.h +++ b/lib/silcutil/silcbuffer.h @@ -569,7 +569,7 @@ unsigned char *silc_buffer_pull(SilcBuffer sb, SilcUInt32 len) * Pushes current data area towards beginning. Length of the currently * valid data area is also incremented. Returns a pointer to the * data area before pushing. Returns NULL if the push would lead to - * buffer underflow or would go under the valid data area. + * go beyond the buffer boundaries or current data area. * * EXAMPLE * @@ -597,7 +597,7 @@ unsigned char *silc_buffer_push(SilcBuffer sb, SilcUInt32 len) SILC_ASSERT((sb->data - len) >= sb->head); #endif /* SILC_DIST_INPLACE */ if (silc_unlikely((sb->data - len) < sb->head)) { - silc_set_errno(SILC_ERR_UNDERFLOW); + silc_set_errno(SILC_ERR_OVERFLOW); return NULL; } @@ -664,7 +664,7 @@ unsigned char *silc_buffer_pull_tail(SilcBuffer sb, SilcUInt32 len) * Pushes current tail section towards beginning. Length of the current * valid data area is also decremented. Returns a pointer to the * tail section before pushing. Returns NULL if the push would lead to - * buffer underflow or go under valid tail area. + * go beyond buffer boundaries or current tail area. * * EXAMPLE * @@ -692,7 +692,7 @@ unsigned char *silc_buffer_push_tail(SilcBuffer sb, SilcUInt32 len) SILC_ASSERT((sb->tail - len) >= sb->data); #endif /* SILC_DIST_INPLACE */ if (silc_unlikely((sb->tail - len) < sb->data)) { - silc_set_errno(SILC_ERR_UNDERFLOW); + silc_set_errno(SILC_ERR_OVERFLOW); return NULL; } diff --git a/lib/silcutil/silcbuffmt.c b/lib/silcutil/silcbuffmt.c index 2daf348f..65346963 100644 --- a/lib/silcutil/silcbuffmt.c +++ b/lib/silcutil/silcbuffmt.c @@ -49,7 +49,7 @@ do { \ goto fail; \ } \ if (silc_unlikely((req + 1) <= 0)) { \ - silc_set_errno(SILC_ERR_UNDERFLOW); \ + silc_set_errno(SILC_ERR_OVERFLOW); \ goto fail; \ } \ } while(0) -- 2.24.0