aboutsummaryrefslogtreecommitdiff
path: root/libssh/buffer.c
diff options
context:
space:
mode:
authorAndreas Schneider <mail@cynapses.org>2009-02-02 15:39:09 +0000
committerAndreas Schneider <mail@cynapses.org>2009-02-02 15:39:09 +0000
commit5d798f62257b29dbcb7a4bdc37e7585b4c4894a3 (patch)
tree35ef615e016d201764d13626e536826cb1e19bec /libssh/buffer.c
parent7250e03f97a46aa8c1229d072b1f6f3a6e13a9a0 (diff)
downloadlibssh-5d798f62257b29dbcb7a4bdc37e7585b4c4894a3.tar.gz
libssh-5d798f62257b29dbcb7a4bdc37e7585b4c4894a3.tar.xz
libssh-5d798f62257b29dbcb7a4bdc37e7585b4c4894a3.zip
Use unsigned values for length in buffer functions.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@211 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'libssh/buffer.c')
-rw-r--r--libssh/buffer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libssh/buffer.c b/libssh/buffer.c
index a5d6cc3..73edcf4 100644
--- a/libssh/buffer.c
+++ b/libssh/buffer.c
@@ -174,7 +174,7 @@ void *buffer_get_rest(BUFFER *buffer){
* \return length of the buffer
* \see buffer_get()
*/
-int buffer_get_len(BUFFER *buffer){
+u32 buffer_get_len(BUFFER *buffer){
return buffer->used;
}
@@ -184,7 +184,7 @@ int buffer_get_len(BUFFER *buffer){
* \return length of the buffer
* \see buffer_get_rest()
*/
-int buffer_get_rest_len(BUFFER *buffer){
+u32 buffer_get_rest_len(BUFFER *buffer){
return buffer->used - buffer->pos;
}
@@ -195,7 +195,7 @@ int buffer_get_rest_len(BUFFER *buffer){
* \param len number of bytes to eat
* \return new size of the buffer
*/
-int buffer_pass_bytes(BUFFER *buffer, u32 len){
+u32 buffer_pass_bytes(BUFFER *buffer, u32 len){
if(buffer->used < buffer->pos+len)
return 0;
buffer->pos+=len;
@@ -213,7 +213,7 @@ int buffer_pass_bytes(BUFFER *buffer, u32 len){
* \param len number of bytes to remove from tail
* \return new size of the buffer
*/
-int buffer_pass_bytes_end(BUFFER *buffer, u32 len){
+u32 buffer_pass_bytes_end(BUFFER *buffer, u32 len){
if(buffer->used < buffer->pos + len)
return 0;
buffer->used-=len;