pigpio.c: reset errno after existance check (#509)

This commit is contained in:
Andreas Franek 2022-01-09 22:31:07 +01:00 committed by GitHub
parent 9dcea25d06
commit d5e52bc81e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -7299,6 +7299,8 @@ static void initCheckLockFile(void)
char str[20];
fd = open(PI_LOCKFILE, O_RDONLY);
if(errno == ENOENT)
errno = 0; // reset if expected error occured
if (fd != -1)
{