basic + fundamental: Clean up includes

Split out of #37344.
This commit is contained in:
Daan De Meyer
2025-05-25 10:06:07 +02:00
parent e6e6131a2c
commit 0c15577abe
262 changed files with 628 additions and 1207 deletions
+3 -5
View File
@@ -1,15 +1,12 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include <errno.h>
#include <inttypes.h>
#include <string.h>
#include "assert-util.h"
#include "macro.h"
#include "forward.h"
/* strerror(3) says that glibc uses a maximum length of 1024 bytes. */
#define ERRNO_BUF_LEN 1024
#define ERRNO_BUF_LEN 1024
/* Note: the lifetime of the compound literal is the immediately surrounding block,
* see C11 §6.5.2.5, and
@@ -55,6 +52,7 @@ static inline int negative_errno(void) {
* It will suppress bogus gcc warnings in case it assumes 'errno' might
* be 0 and thus the caller's error-handling might not be triggered. */
assert_return(errno > 0, -EINVAL);
return -errno;
}