diff options
author | Gunnar Beutner <gunnar@beutner.name> | 2021-04-11 19:00:36 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-04-14 21:46:20 +0200 |
commit | 546fa8cfb52b97f479002e6e2b5327c2e0b45297 (patch) | |
tree | 45d412b06d215930544105d845f7c535287573fa /Userland | |
parent | 6a808d96b5e9948cfc9f09a368fb0c1f6c351c94 (diff) | |
download | serenity-546fa8cfb52b97f479002e6e2b5327c2e0b45297.zip |
LibC: Change return type for sleep() to unsigned int
According to POSIX.1-2001 the return type should be unsigned int.
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibC/unistd.cpp | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibC/unistd.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibC/unistd.cpp b/Userland/Libraries/LibC/unistd.cpp index 8fd1acb93e..5d0fe6db68 100644 --- a/Userland/Libraries/LibC/unistd.cpp +++ b/Userland/Libraries/LibC/unistd.cpp @@ -409,7 +409,7 @@ char* getwd(char* buf) return p; } -int sleep(unsigned seconds) +unsigned int sleep(unsigned int seconds) { struct timespec ts = { seconds, 0 }; if (clock_nanosleep(CLOCK_MONOTONIC_COARSE, 0, &ts, nullptr) < 0) diff --git a/Userland/Libraries/LibC/unistd.h b/Userland/Libraries/LibC/unistd.h index aca2197301..54dd27a891 100644 --- a/Userland/Libraries/LibC/unistd.h +++ b/Userland/Libraries/LibC/unistd.h @@ -106,7 +106,7 @@ int chdir(const char* path); int fchdir(int fd); char* getcwd(char* buffer, size_t size); char* getwd(char* buffer); -int sleep(unsigned seconds); +unsigned int sleep(unsigned int seconds); int usleep(useconds_t); int gethostname(char*, size_t); int sethostname(const char*, ssize_t); |