From: Volker Lendecke Date: Fri, 24 May 2019 12:37:20 +0000 (+0200) Subject: dbwrap: Use sizeof, not an integer constant X-Git-Tag: ldb-2.0.5~605 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=905698fbe667de856a19eb9ff96f5865a6775e55;p=thirdparty%2Fsamba.git dbwrap: Use sizeof, not an integer constant Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/lib/dbwrap/dbwrap_watch.c b/source3/lib/dbwrap/dbwrap_watch.c index 45e17958b92..c367efdd130 100644 --- a/source3/lib/dbwrap/dbwrap_watch.c +++ b/source3/lib/dbwrap/dbwrap_watch.c @@ -361,7 +361,8 @@ static void dbwrap_watched_wakeup(struct db_record *rec, SIVAL(len_buf, 0, db_id_len); - iov[0] = (struct iovec) { .iov_base = len_buf, .iov_len = 4 }; + iov[0] = (struct iovec) { .iov_base = len_buf, + .iov_len = sizeof(len_buf) }; iov[1] = (struct iovec) { .iov_base = db_id, .iov_len = db_id_len }; iov[2] = (struct iovec) { .iov_base = rec->key.dptr, .iov_len = rec->key.dsize };