applies clang-format fixes

This commit is contained in:
2026-03-20 11:42:58 +01:00
parent 0e948fe1be
commit 75505f214e
2 changed files with 53 additions and 54 deletions

View File

@@ -22,7 +22,7 @@ void __wrap_exit(int code) {
#ifndef HAVE_NO_INIT_FINI #ifndef HAVE_NO_INIT_FINI
__libc_fini_array(); __libc_fini_array();
#endif #endif
const char message[] = "\nProgam has exited with code:"; const char message[] = "\nProgram has exited with code:";
write(STDERR_FILENO, message, sizeof(message) - 1); write(STDERR_FILENO, message, sizeof(message) - 1);
write_hex(STDERR_FILENO, code); write_hex(STDERR_FILENO, code);
write(STDERR_FILENO, "\n", 1); write(STDERR_FILENO, "\n", 1);

View File

@@ -1,5 +1,5 @@
#include <unistd.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h>
extern int _end; extern int _end;
void* _sbrk(int incr); void* _sbrk(int incr);
@@ -48,11 +48,12 @@ int _lseek(int file, int ptr, int dir) {
} }
void _exit(int status) { void _exit(int status) {
const char message[] = "\nProgam has exited with code:"; const char message[] = "\nProgram has exited with code:";
write(STDERR_FILENO, message, sizeof(message) - 1); write(STDERR_FILENO, message, sizeof(message) - 1);
write_hex(STDERR_FILENO, status); write_hex(STDERR_FILENO, status);
write(STDERR_FILENO, "\n", 1); write(STDERR_FILENO, "\n", 1);
for (;;); for(;;)
;
} }
void _kill(int pid, int sig) { void _kill(int pid, int sig) {
@@ -61,9 +62,7 @@ void _kill(int pid, int sig) {
return; return;
} }
int _getpid(void) { int _getpid(void) { return -1; }
return -1;
}
void write_hex(int fd, unsigned long int hex) { void write_hex(int fd, unsigned long int hex) {
uint8_t ii; uint8_t ii;