mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 10:18:15 +09:00
Meta+Userland: Make clang-format-10 clean
This commit is contained in:
parent
934d4d4033
commit
a2feef17bf
Notes:
sideshowbarker
2024-07-19 02:14:24 +09:00
Author: https://github.com/BenWiederhake
Commit: a2feef17bf
Pull-request: https://github.com/SerenityOS/serenity/pull/3541
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/linusg
7 changed files with 27 additions and 31 deletions
|
@ -31,8 +31,8 @@
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
|
|
|
@ -173,7 +173,7 @@ int main(int argc, char** argv)
|
||||||
}).run(run_type);
|
}).run(run_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (do_illegal_instruction|| do_all_crash_types) {
|
if (do_illegal_instruction || do_all_crash_types) {
|
||||||
Crash("Illegal instruction", []() {
|
Crash("Illegal instruction", []() {
|
||||||
asm volatile("ud2");
|
asm volatile("ud2");
|
||||||
return Crash::Failure::DidNotCrash;
|
return Crash::Failure::DidNotCrash;
|
||||||
|
|
|
@ -42,7 +42,8 @@
|
||||||
// The fractional part in the lower 32 bits stores fractional bits times 2 ** 32.
|
// The fractional part in the lower 32 bits stores fractional bits times 2 ** 32.
|
||||||
typedef uint64_t NtpTimestamp;
|
typedef uint64_t NtpTimestamp;
|
||||||
|
|
||||||
struct [[gnu::packed]] NtpPacket {
|
struct [[gnu::packed]] NtpPacket
|
||||||
|
{
|
||||||
uint8_t li_vn_mode;
|
uint8_t li_vn_mode;
|
||||||
uint8_t stratum;
|
uint8_t stratum;
|
||||||
int8_t poll;
|
int8_t poll;
|
||||||
|
@ -182,7 +183,7 @@ int main(int argc, char** argv)
|
||||||
|
|
||||||
iovec iov { &packet, sizeof(packet) };
|
iovec iov { &packet, sizeof(packet) };
|
||||||
char control_message_buffer[CMSG_SPACE(sizeof(timeval))];
|
char control_message_buffer[CMSG_SPACE(sizeof(timeval))];
|
||||||
msghdr msg = { &peer_address, sizeof(peer_address), &iov, 1, control_message_buffer, sizeof(control_message_buffer), 0};
|
msghdr msg = { &peer_address, sizeof(peer_address), &iov, 1, control_message_buffer, sizeof(control_message_buffer), 0 };
|
||||||
rc = recvmsg(fd, &msg, 0);
|
rc = recvmsg(fd, &msg, 0);
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
perror("recvmsg");
|
perror("recvmsg");
|
||||||
|
|
|
@ -27,15 +27,11 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
|
||||||
int main(int, char**)
|
int main(int, char**)
|
||||||
{
|
{
|
||||||
if (reboot() < 0){
|
if (reboot() < 0) {
|
||||||
perror("reboot");
|
perror("reboot");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <AK/Vector.h>
|
#include <AK/Vector.h>
|
||||||
#include <LibCore/ArgsParser.h>
|
|
||||||
#include <LibCore/Account.h>
|
#include <LibCore/Account.h>
|
||||||
|
#include <LibCore/ArgsParser.h>
|
||||||
#include <LibCore/GetPassword.h>
|
#include <LibCore/GetPassword.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
if (rc < 0) { \
|
if (rc < 0) { \
|
||||||
fprintf(stderr, "Expected success: " #syscall "(%p, %zu), got rc=%d, errno=%d\n", (void*)(address), (size_t)(size), rc, errno); \
|
fprintf(stderr, "Expected success: " #syscall "(%p, %zu), got rc=%d, errno=%d\n", (void*)(address), (size_t)(size), rc, errno); \
|
||||||
} \
|
} \
|
||||||
} while(0)
|
} while (0)
|
||||||
|
|
||||||
#define EXPECT_EFAULT(syscall, address, size) \
|
#define EXPECT_EFAULT(syscall, address, size) \
|
||||||
do { \
|
do { \
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
if (rc >= 0 || errno != EFAULT) { \
|
if (rc >= 0 || errno != EFAULT) { \
|
||||||
fprintf(stderr, "Expected EFAULT: " #syscall "(%p, %zu), got rc=%d, errno=%d\n", (void*)(address), (size_t)(size), rc, errno); \
|
fprintf(stderr, "Expected EFAULT: " #syscall "(%p, %zu), got rc=%d, errno=%d\n", (void*)(address), (size_t)(size), rc, errno); \
|
||||||
} \
|
} \
|
||||||
} while(0)
|
} while (0)
|
||||||
|
|
||||||
#define EXPECT_EFAULT_NO_FD(syscall, address, size) \
|
#define EXPECT_EFAULT_NO_FD(syscall, address, size) \
|
||||||
do { \
|
do { \
|
||||||
|
@ -53,8 +53,7 @@
|
||||||
if (rc >= 0 || errno != EFAULT) { \
|
if (rc >= 0 || errno != EFAULT) { \
|
||||||
fprintf(stderr, "Expected EFAULT: " #syscall "(%p, %zu), got rc=%d, errno=%d\n", (void*)(address), (size_t)(size), rc, errno); \
|
fprintf(stderr, "Expected EFAULT: " #syscall "(%p, %zu), got rc=%d, errno=%d\n", (void*)(address), (size_t)(size), rc, errno); \
|
||||||
} \
|
} \
|
||||||
} while(0)
|
} while (0)
|
||||||
|
|
||||||
|
|
||||||
int main(int, char**)
|
int main(int, char**)
|
||||||
{
|
{
|
||||||
|
|
|
@ -24,8 +24,8 @@
|
||||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <AK/String.h>
|
|
||||||
#include <AK/QuickSort.h>
|
#include <AK/QuickSort.h>
|
||||||
|
#include <AK/String.h>
|
||||||
#include <AK/Vector.h>
|
#include <AK/Vector.h>
|
||||||
#include <LibCore/ArgsParser.h>
|
#include <LibCore/ArgsParser.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue