diff options
author | Andreas Schneider <asn@samba.org> | 2018-11-23 12:00:36 +0100 |
---|---|---|
committer | Gary Lockyer <gary@samba.org> | 2018-12-03 21:16:31 +0100 |
commit | 4e9b3ed4126fad653f219334cbca2dbf53ddfc20 (patch) | |
tree | 033a0f8e3bfebea9a621bee0f86db19760b79521 /source3 | |
parent | dd7574afd1b2fb6a88defa154bc3d15e94f9ce0d (diff) | |
download | samba-4e9b3ed4126fad653f219334cbca2dbf53ddfc20.tar.gz |
s3:lib: Fix uninitialized variable
util_tdb.c:116:7: error: ‘len’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
buf += len;
^~
../../source3/lib/util_tdb.c:44:6: note: ‘len’ was declared here
int len;
^~~
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/util_tdb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/lib/util_tdb.c b/source3/lib/util_tdb.c index cbcca4df09f..4f2450c5773 100644 --- a/source3/lib/util_tdb.c +++ b/source3/lib/util_tdb.c @@ -41,7 +41,7 @@ static size_t tdb_pack_va(uint8_t *buf, int bufsize, const char *fmt, va_list ap uint32_t d; int i; void *p; - int len; + int len = 0; char *s; char c; uint8_t *buf0 = buf; |