Skip to content
Snippets Groups Projects
Commit 4e56039b authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

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.
parent 1bad2203
No related branches found
No related tags found
1 merge request!455Update branch with changes from master
...@@ -33,11 +33,15 @@ ...@@ -33,11 +33,15 @@
/* date/time stamp (if the file exists) against the passed time stamp (t) */ /* 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 */ /* updating the time stamp to the latest dated semaphore file and returning */
/* TRUE if any where newer than the initial value. */ /* 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) BOOL semfile_check(time_t* t, const char* fname)
{ {
time_t ft; time_t ft;
if(t == NULL)
return fexist(fname);
if(*t==0) /* uninitialized */ if(*t==0) /* uninitialized */
*t=time(NULL); *t=time(NULL);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment