From 94dcda1ee2c2d11bee0ad9cdfc0341d2a209c10a Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 14 Aug 2023 17:28:28 +0200 Subject: [PATCH] examples: Slightly modernize printfs in teststat long long works, but it's a bit too specific now that we have intmax_t Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- examples/libsmbclient/teststat.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/examples/libsmbclient/teststat.c b/examples/libsmbclient/teststat.c index 714bffebb2d..c8973e6ad0d 100644 --- a/examples/libsmbclient/teststat.c +++ b/examples/libsmbclient/teststat.c @@ -53,10 +53,13 @@ int main(int argc, char * argv[]) return 1; } - printf("\nSAMBA\n mtime:%lld/%s ctime:%lld/%s atime:%lld/%s\n", - (long long)st.st_mtime, ctime_r(&st.st_mtime, m_time), - (long long)st.st_ctime, ctime_r(&st.st_ctime, c_time), - (long long)st.st_atime, ctime_r(&st.st_atime, a_time)); + printf("\nSAMBA\n mtime:%jd/%s ctime:%jd/%s atime:%jd/%s\n", + (intmax_t)st.st_mtime, + ctime_r(&st.st_mtime, m_time), + (intmax_t)st.st_ctime, + ctime_r(&st.st_ctime, c_time), + (intmax_t)st.st_atime, + ctime_r(&st.st_atime, a_time)); if (pLocalPath != NULL) { ret = stat(pLocalPath, &st); @@ -65,10 +68,13 @@ int main(int argc, char * argv[]) return 1; } - printf("LOCAL\n mtime:%lld/%s ctime:%lld/%s atime:%lld/%s\n", - (long long)st.st_mtime, ctime_r(&st.st_mtime, m_time), - (long long)st.st_ctime, ctime_r(&st.st_ctime, c_time), - (long long)st.st_atime, ctime_r(&st.st_atime, a_time)); + printf("LOCAL\n mtime:%jd/%s ctime:%jd/%s atime:%jd/%s\n", + (intmax_t)st.st_mtime, + ctime_r(&st.st_mtime, m_time), + (intmax_t)st.st_ctime, + ctime_r(&st.st_ctime, c_time), + (intmax_t)st.st_atime, + ctime_r(&st.st_atime, a_time)); } return 0; -- 2.11.4.GIT