about summary refs log tree commit diff
path: root/Src/watch.c
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2021-04-11 22:26:36 +0200
committerOliver Kiddle <opk@zsh.org>2021-04-11 22:26:36 +0200
commit704d10989e0db83bd6460e847a9f89017e290474 (patch)
tree06053a32217b9f55772b630baa7a554f89be7ad3 /Src/watch.c
parent638815623368683e685a8d706e57634f6fec6401 (diff)
downloadzsh-704d10989e0db83bd6460e847a9f89017e290474.tar.gz
zsh-704d10989e0db83bd6460e847a9f89017e290474.tar.xz
zsh-704d10989e0db83bd6460e847a9f89017e290474.zip
48504: use SEEK_ macros in fseek() calls
Diffstat (limited to 'Src/watch.c')
-rw-r--r--Src/watch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/watch.c b/Src/watch.c
index 93b3cb134..c41704315 100644
--- a/Src/watch.c
+++ b/Src/watch.c
@@ -169,9 +169,9 @@ getlogtime(WATCH_STRUCT_UTMP *u, int inout)
 	return u->ut_time;
     if (!(in = fopen(WATCH_WTMP_FILE, "r")))
 	return time(NULL);
-    fseek(in, 0, 2);
+    fseek(in, 0, SEEK_END);
     do {
-	if (fseek(in, ((first) ? -1 : -2) * sizeof(WATCH_STRUCT_UTMP), 1)) {
+	if (fseek(in, ((first) ? -1 : -2) * sizeof(WATCH_STRUCT_UTMP), SEEK_CUR)) {
 	    fclose(in);
 	    return time(NULL);
 	}