Description: fix compile error: passing argument 1 of ‘localtime’
 from incompatible pointer type [-Wincompatible-pointer-types]
Bug-Debian: #1091309
Forwarded: not-needed

---

Origin: xiao sheng wen <atzlinux@sina.com>
Last-Update: 2024-12-24

diff --git a/miscfuncs.c b/miscfuncs.c
index ae2e500..eab7a3b 100644
--- miscfuncs.c
+++ miscfuncs.c
@@ -277,7 +277,7 @@ char *quit_ch(void)
 }
 
 
-VOID *safe_malloc(size_t n)
+VOID *safe_malloc(int n)
 {
 	VOID *p;
 	if ((p = malloc(n)) == NULL) {
@@ -287,7 +287,7 @@ VOID *safe_malloc(size_t n)
 	return p;
 }
 
-VOID *safe_realloc(VOID *p, size_t n)
+VOID *safe_realloc(VOID *p, int n)
 {
 	VOID *p1;
 	if ((p1 = realloc(p, n)) == NULL) {
diff --git a/xtail.h b/xtail.h
index aef0f58..d2011c2 100644
--- xtail.h
+++ xtail.h
@@ -203,8 +203,8 @@ void fixup_open_files(void);
 void message(int sel, const struct entry_descrip *e);
 void show_status(void);
 char *quit_ch(void);
-VOID *safe_malloc(size_t n);
-VOID *safe_realloc(VOID *p, size_t n);
+VOID *safe_malloc(int n);
+VOID *safe_realloc(VOID *p, int n);
 char *safe_strdup(const char *p);
 char *basename(char *p);
 #ifndef HAVE_DIFFTIME
