]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_commit: Make dbytes and dthresh size_t
authorVolker Lendecke <vl@samba.org>
Sun, 19 Oct 2025 09:28:21 +0000 (11:28 +0200)
committerVolker Lendecke <vl@samba.org>
Wed, 7 Jan 2026 09:57:41 +0000 (09:57 +0000)
Those can never go negative, use "%zu" as printf modifier

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
source3/modules/vfs_commit.c

index 355edeac13aaf2bb72804bae98807d4c0e61c0c4..a5d334c81bc801f04078c2fa2bad0529bd34c398 100644 (file)
@@ -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));
                 }