aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/sbuf.h
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2011-05-16 16:18:40 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2011-05-16 16:18:40 +0000
commit71c2bc5c6b9427ee790022f35c57e43412814d4f (patch)
tree4f72ad837087adab324f68764a4e0eaf45cb935f /sys/sys/sbuf.h
parentd0c8ecb812f952a0e935f5e61cf755169dfef6ce (diff)
downloadsrc-71c2bc5c6b9427ee790022f35c57e43412814d4f.tar.gz
src-71c2bc5c6b9427ee790022f35c57e43412814d4f.zip
Change the length quantities of sbufs to be ssize_t rather than int.
Constify a couple of arguments.
Notes
Notes: svn path=/head/; revision=221993
Diffstat (limited to 'sys/sys/sbuf.h')
-rw-r--r--sys/sys/sbuf.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/sys/sbuf.h b/sys/sys/sbuf.h
index eeb38140da52..2a9cb0e9c1f0 100644
--- a/sys/sys/sbuf.h
+++ b/sys/sys/sbuf.h
@@ -44,8 +44,8 @@ struct sbuf {
sbuf_drain_func *s_drain_func; /* drain function */
void *s_drain_arg; /* user-supplied drain argument */
int s_error; /* current error code */
- int s_size; /* size of storage buffer */
- int s_len; /* current length of string */
+ ssize_t s_size; /* size of storage buffer */
+ ssize_t s_len; /* current length of string */
#define SBUF_FIXEDLEN 0x00000000 /* fixed length buffer (default) */
#define SBUF_AUTOEXTEND 0x00000001 /* automatically extend buffer */
#define SBUF_USRFLAGMSK 0x0000ffff /* mask of flags the user may specify */
@@ -63,7 +63,7 @@ struct sbuf *sbuf_new(struct sbuf *, char *, int, int);
#define sbuf_new_auto() \
sbuf_new(NULL, NULL, 0, SBUF_AUTOEXTEND)
void sbuf_clear(struct sbuf *);
-int sbuf_setpos(struct sbuf *, int);
+int sbuf_setpos(struct sbuf *, ssize_t);
int sbuf_bcat(struct sbuf *, const void *, size_t);
int sbuf_bcpy(struct sbuf *, const void *, size_t);
int sbuf_cat(struct sbuf *, const char *);
@@ -75,11 +75,11 @@ int sbuf_vprintf(struct sbuf *, const char *, __va_list)
int sbuf_putc(struct sbuf *, int);
void sbuf_set_drain(struct sbuf *, sbuf_drain_func *, void *);
int sbuf_trim(struct sbuf *);
-int sbuf_error(struct sbuf *);
+int sbuf_error(const struct sbuf *);
int sbuf_finish(struct sbuf *);
char *sbuf_data(struct sbuf *);
-int sbuf_len(struct sbuf *);
-int sbuf_done(struct sbuf *);
+ssize_t sbuf_len(struct sbuf *);
+int sbuf_done(const struct sbuf *);
void sbuf_delete(struct sbuf *);
#ifdef _KERNEL