messaging_dgm: Use %ju to fill lockfile
authorVolker Lendecke <vl@samba.org>
Sat, 2 Aug 2014 11:57:43 +0000 (13:57 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 22 Aug 2014 00:53:52 +0000 (02:53 +0200)
... much nicer than PRIu64

Also, append a \n. Makes it better readable when looking at the lockfile

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/lib/messages_dgm.c

index e2ee7512dfdbc21a3daa7ed5b97751277dcb739d..1bf1805f7c188ad5f47c172e40be5c9e4bbbb963 100644 (file)
@@ -106,7 +106,7 @@ static int messaging_dgm_lockfile_create(TALLOC_CTX *tmp_ctx,
                goto fail_close;
        }
 
-       unique_len = snprintf(buf, sizeof(buf), "%"PRIu64, unique);
+       unique_len = snprintf(buf, sizeof(buf), "%ju\n", (uintmax_t)unique);
 
        /* shorten a potentially preexisting file */