about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>2019-03-25 23:51:57 +0900
committerJun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>2019-03-25 23:51:57 +0900
commit52f3266bd010918122ae039510486131a2c4afe3 (patch)
tree11aa2eb36c4aa4948e1d58dff38f42dc8dba70d9
parent5ca680c93cb28c6616cc8f82db80a2425685dc38 (diff)
downloadzsh-52f3266bd010918122ae039510486131a2c4afe3.tar.gz
zsh-52f3266bd010918122ae039510486131a2c4afe3.tar.xz
zsh-52f3266bd010918122ae039510486131a2c4afe3.zip
44176: warn only if off_t is longer than long
-rw-r--r--ChangeLog2
-rw-r--r--Src/Modules/zftp.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index a78102ac1..c637219ba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2019-03-25  Jun-ichi Takimoto  <takimoto-j@kba.biglobe.ne.jp>
 
+	* 44176: Src/Modules/zftp.c: warn only if off_t is longer than long
+
 	* Wesley Schwengle: 44162 (tweaked): Src/Modules/zftp.c: Avoid
 	format-overflow warning by using ztrftime()
 
diff --git a/Src/Modules/zftp.c b/Src/Modules/zftp.c
index adf35b69e..8bebc020d 100644
--- a/Src/Modules/zftp.c
+++ b/Src/Modules/zftp.c
@@ -2512,7 +2512,8 @@ zftp_local(UNUSED(char *name), char **args, int flags)
 #ifdef OFF_T_IS_64_BIT
 	printf("%s %s\n", output64(sz), mt);
 #else
-	DPUTS(sizeof(sz) > 4, "Shell compiled with wrong off_t size");
+	DPUTS(sizeof(sz) > sizeof(long),
+		"Shell compiled with wrong off_t size");
 	printf("%ld %s\n", (long)sz, mt);
 #endif
 	zsfree(mt);