From: Volker Lendecke Date: Sun, 19 Oct 2025 09:28:21 +0000 (+0200) Subject: vfs_commit: Make dbytes and dthresh size_t X-Git-Tag: tdb-1.4.15~142 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee07cf7ca33a4305904583b0f2ccb69612d9086c;p=thirdparty%2Fsamba.git vfs_commit: Make dbytes and dthresh size_t Those can never go negative, use "%zu" as printf modifier Signed-off-by: Volker Lendecke Reviewed-by: Anoop C S --- diff --git a/source3/modules/vfs_commit.c b/source3/modules/vfs_commit.c index 355edeac13a..a5d334c81bc 100644 --- a/source3/modules/vfs_commit.c +++ b/source3/modules/vfs_commit.c @@ -69,8 +69,8 @@ enum eof_mode struct commit_info { /* For chunk-based commits */ - off_t dbytes; /* Dirty (uncommitted) bytes */ - off_t dthresh; /* Dirty data threshold */ + size_t dbytes; /* Dirty (uncommitted) bytes */ + size_t dthresh; /* Dirty data threshold */ /* For commits on EOF */ enum eof_mode on_eof; off_t eof; /* Expected file size */ @@ -83,8 +83,8 @@ static int commit_do( int result; DEBUG(module_debug, - ("%s: flushing %lu dirty bytes\n", - MODULE, (unsigned long)c->dbytes)); + ("%s: flushing %zu dirty bytes\n", + MODULE, c->dbytes)); #if defined(HAVE_FDATASYNC) result = fdatasync(fd); @@ -110,8 +110,8 @@ static int commit_all( if ((c = (struct commit_info *)VFS_FETCH_FSP_EXTENSION(handle, fsp))) { if (c->dbytes) { DEBUG(module_debug, - ("%s: flushing %lu dirty bytes\n", - MODULE, (unsigned long)c->dbytes)); + ("%s: flushing %zu dirty bytes\n", + MODULE, c->dbytes)); return commit_do(c, fsp_get_io_fd(fsp)); }