diff options
author | 1999-11-24 19:53:43 +0000 | |
---|---|---|
committer | 1999-11-24 19:53:43 +0000 | |
commit | bbc3e7c1e8e1af65828ac62d704e08603bfb3791 (patch) | |
tree | 4283772edb80175f48931910dc69d6bca31941f2 /usr.bin/ssh/buffer.c | |
parent | Limit newaliases to root and trusted users; sendmail+gshapiro@sendmail.orG (diff) | |
download | wireguard-openbsd-bbc3e7c1e8e1af65828ac62d704e08603bfb3791.tar.xz wireguard-openbsd-bbc3e7c1e8e1af65828ac62d704e08603bfb3791.zip |
KNF, final part 3
Diffstat (limited to 'usr.bin/ssh/buffer.c')
-rw-r--r-- | usr.bin/ssh/buffer.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/usr.bin/ssh/buffer.c b/usr.bin/ssh/buffer.c index 0f117ccc1c7..65579341b8c 100644 --- a/usr.bin/ssh/buffer.c +++ b/usr.bin/ssh/buffer.c @@ -14,7 +14,7 @@ */ #include "includes.h" -RCSID("$Id: buffer.c,v 1.3 1999/11/24 00:26:01 deraadt Exp $"); +RCSID("$Id: buffer.c,v 1.4 1999/11/24 19:53:44 markus Exp $"); #include "xmalloc.h" #include "buffer.h" @@ -40,8 +40,10 @@ buffer_free(Buffer *buffer) xfree(buffer->buf); } -/* Clears any data from the buffer, making it empty. This does not actually - zero the memory. */ +/* + * Clears any data from the buffer, making it empty. This does not actually + * zero the memory. + */ void buffer_clear(Buffer *buffer) @@ -60,9 +62,11 @@ buffer_append(Buffer *buffer, const char *data, unsigned int len) memcpy(cp, data, len); } -/* Appends space to the buffer, expanding the buffer if necessary. - This does not actually copy the data into the buffer, but instead - returns a pointer to the allocated region. */ +/* + * Appends space to the buffer, expanding the buffer if necessary. This does + * not actually copy the data into the buffer, but instead returns a pointer + * to the allocated region. + */ void buffer_append_space(Buffer *buffer, char **datap, unsigned int len) @@ -79,8 +83,10 @@ restart: buffer->end += len; return; } - /* If the buffer is quite empty, but all data is at the end, move - the data to the beginning and retry. */ + /* + * If the buffer is quite empty, but all data is at the end, move the + * data to the beginning and retry. + */ if (buffer->offset > buffer->alloc / 2) { memmove(buffer->buf, buffer->buf + buffer->offset, buffer->end - buffer->offset); |