diff options
author | Jeremy Allison <jra@samba.org> | 2001-04-13 19:12:06 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-04-13 19:12:06 +0000 |
commit | fc76681812b1469208ad6c8847afdfc68bc6db49 (patch) | |
tree | 016255c268fa14d259facf86e8b4c9ec357d0006 /source/tdb/tdbutil.c | |
parent | 4f06373bc450b27692619ae877d29767ad160297 (diff) | |
download | samba-fc76681812b1469208ad6c8847afdfc68bc6db49.tar.gz samba-fc76681812b1469208ad6c8847afdfc68bc6db49.tar.xz samba-fc76681812b1469208ad6c8847afdfc68bc6db49.zip |
Merge of Andrew's changes in 2.2.
Jeremy.
Diffstat (limited to 'source/tdb/tdbutil.c')
-rw-r--r-- | source/tdb/tdbutil.c | 50 |
1 files changed, 2 insertions, 48 deletions
diff --git a/source/tdb/tdbutil.c b/source/tdb/tdbutil.c index 27aac560e0a..d683d70c469 100644 --- a/source/tdb/tdbutil.c +++ b/source/tdb/tdbutil.c @@ -120,44 +120,21 @@ TDB_DATA tdb_fetch_by_string(TDB_CONTEXT *tdb, char *keystr) /* useful pair of routines for packing/unpacking data consisting of integers and strings */ -#ifdef HAVE_STDARG_H size_t tdb_pack(char *buf, int bufsize, char *fmt, ...) { -#else /* HAVE_STDARG_H */ - size_t tdb_pack(va_alist) -va_dcl -{ - char *buf, *fmt; - int bufsize; -#endif /* HAVE_STDARG_H */ va_list ap; uint16 w; uint32 d; int i; void *p; - int len = 0; + int len; char *s; char c; -#ifdef HAVE_STDARG_H char *buf0 = buf; char *fmt0 = fmt; int bufsize0 = bufsize; va_start(ap, fmt); -#else /* HAVE_STDARG_H */ - char *buf0; - char *fmt0; - int bufsize0; - - va_start(ap); - buf = va_arg(ap,char *); - bufsize = va_arg(ap,int); - fmt = va_arg(ap,char *); - - buf0 = buf; - fmt0 = fmt; - bufsize0 = bufsize; -#endif /* HAVE_STDARG_H */ while (*fmt) { switch ((c = *fmt++)) { @@ -230,44 +207,21 @@ va_dcl /* useful pair of routines for packing/unpacking data consisting of integers and strings */ -#ifdef HAVE_STDARG_H int tdb_unpack(char *buf, int bufsize, char *fmt, ...) { -#else /* HAVE_STDARG_H */ - int tdb_unpack(va_alist) -va_dcl -{ - char *buf, *fmt; - int bufsize; -#endif /* HAVE_STDARG_H */ va_list ap; uint16 *w; uint32 *d; - int len = 0; + int len; int *i; void **p; char *s, **b; char c; -#ifdef HAVE_STDARG_H char *buf0 = buf; char *fmt0 = fmt; int bufsize0 = bufsize; va_start(ap, fmt); -#else /* HAVE_STDARG_H */ - char *buf0; - char *fmt0; - int bufsize0; - - va_start(ap); - buf = va_arg(ap,char *); - bufsize = va_arg(ap,int); - fmt = va_arg(ap,char *); - - buf0 = buf; - fmt0 = fmt; - bufsize0 = bufsize; -#endif /* HAVE_STDARG_H */ while (*fmt) { switch ((c=*fmt++)) { |