Skip to content

Commit cbbd114

Browse files
committed
[libc] fix minor nits
1 parent 66f9bc1 commit cbbd114

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

libc/src/__support/OSUtil/darwin/exit.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@ namespace LIBC_NAMESPACE_DECL {
1515
namespace internal {
1616

1717
[[noreturn]] void exit(int status) {
18-
for (;;) {
18+
for (;;)
1919
LIBC_NAMESPACE::syscall_impl<long>(SYS_exit, status);
20-
}
2120
}
2221

2322
} // namespace internal

libc/src/__support/time/darwin/clock_gettime.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,17 @@ namespace LIBC_NAMESPACE_DECL {
2121
namespace internal {
2222

2323
ErrorOr<int> clock_gettime(clockid_t clockid, struct timespec *ts) {
24-
if (clockid != CLOCK_REALTIME) {
24+
if (clockid != CLOCK_REALTIME)
2525
return Error(EINVAL);
26-
}
2726
struct timeval tv;
2827
// The second argument to gettimeofday is a timezone pointer
2928
// The third argument is mach_absolute_time
3029
// Both of these, we don't need here, so they are 0
3130
long ret = LIBC_NAMESPACE::syscall_impl<long>(
3231
SYS_gettimeofday, reinterpret_cast<long>(&tv), 0, 0);
33-
if (ret != 0) {
32+
if (ret != 0)
3433
// The syscall returns -1 on error and sets errno.
3534
return Error(EINVAL);
36-
}
3735

3836
ts->tv_sec = tv.tv_sec;
3937
ts->tv_nsec = tv.tv_usec * 1000;

libc/src/time/darwin/clock_gettime.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
//===---------- Darwin implementation of the POSIX clock_gettime function
2-
//--===//
1+
//===---- Darwin implementation of the POSIX clock_gettime function --===//
32
//
43
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
54
// See https://llvm.org/LICENSE.txt for license information.
65
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
76
//
8-
//===----------------------------------------------------------------------===//
7+
//===-----------------------------------------------------------------===//
98

109
#include "src/time/clock_gettime.h"
1110

0 commit comments

Comments
 (0)