Skip to content

Commit 0566dec

Browse files
committed
testdir40: try 3.
1 parent 31999eb commit 0566dec

3 files changed

Lines changed: 12 additions & 10 deletions

File tree

testdir40/gllib/pthread_mutex_timedlock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ pthread_mutex_timedlock (pthread_mutex_t *mutex, const struct timespec *abstime)
4040
Therefore start the loop with a pthread_mutex_trylock call. */
4141
for (;;)
4242
{
43-
err = pthread_mutex_trylock (mutex);
43+
int err = pthread_mutex_trylock (mutex);
4444
if (err != EBUSY)
4545
return err;
4646

testdir40/gllib/renameatu.c

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,15 @@ renameatu (int fd1, char const *src, int fd2, char const *dst,
145145
is defined, because RENAME_EXCL is buggy on macOS 11.2:
146146
renameatx_np (fd, "X", fd, "X", RENAME_EXCL) incorrectly
147147
succeeds when X exists. */
148-
struct stat dst_st;
149-
if (fstatat (fd2, dst, &dst_st, AT_SYMLINK_NOFOLLOW) == 0
150-
|| errno == EOVERFLOW)
151-
return errno_fail (EEXIST);
152-
if (errno != ENOENT)
153-
return -1;
154-
dst_found_nonexistent = true;
148+
{
149+
struct stat dst_st;
150+
if (fstatat (fd2, dst, &dst_st, AT_SYMLINK_NOFOLLOW) == 0
151+
|| errno == EOVERFLOW)
152+
return errno_fail (EEXIST);
153+
if (errno != ENOENT)
154+
return -1;
155+
dst_found_nonexistent = true;
156+
}
155157
break;
156158

157159
case RENAME_EXCHANGE:

testdir40/gllib/select.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ rpl_select (int nfds, fd_set *rfds, fd_set *wfds, fd_set *xfds,
307307
for (int i = 0; i < rfds->fd_count; i++)
308308
{
309309
int fd = rfds->fd_array[i];
310-
h = (HANDLE) _get_osfhandle (fd);
310+
HANDLE h = (HANDLE) _get_osfhandle (fd);
311311
DWORD nbuffer;
312312
if (!IsConsoleHandle (h)
313313
|| GetNumberOfConsoleInputEvents (h, &nbuffer))
@@ -323,7 +323,7 @@ rpl_select (int nfds, fd_set *rfds, fd_set *wfds, fd_set *xfds,
323323
for (int i = 0; i < wfds->fd_count; i++)
324324
{
325325
int fd = wfds->fd_array[i];
326-
h = (HANDLE) _get_osfhandle (fd);
326+
HANDLE h = (HANDLE) _get_osfhandle (fd);
327327
DWORD nbuffer;
328328
if (!IsConsoleHandle (h)
329329
|| !GetNumberOfConsoleInputEvents (h, &nbuffer))

0 commit comments

Comments
 (0)