From 4e56039b48fbea35c1dc2c18d1a34fdfe6d13a28 Mon Sep 17 00:00:00 2001 From: "Rob Swindell (on Debian Linux)" <rob@synchro.net> Date: Thu, 11 Jan 2024 00:32:51 -0800 Subject: [PATCH] If semfile_check() is passed a NULL time_t*, just check for file existence In this case, we don't care what the time stamp on the file is. --- src/xpdev/semfile.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/xpdev/semfile.c b/src/xpdev/semfile.c index 577568bb9b..84182a73c1 100644 --- a/src/xpdev/semfile.c +++ b/src/xpdev/semfile.c @@ -33,11 +33,15 @@ /* date/time stamp (if the file exists) against the passed time stamp (t) */ /* updating the time stamp to the latest dated semaphore file and returning */ /* TRUE if any where newer than the initial value. */ +/* If the 't' parameter is NULL, only file existence is checked (not time). */ /****************************************************************************/ BOOL semfile_check(time_t* t, const char* fname) { time_t ft; + if(t == NULL) + return fexist(fname); + if(*t==0) /* uninitialized */ *t=time(NULL); -- GitLab