summaryrefslogtreecommitdiffstats
path: root/include/c/mem/cmp/memcmp.h
blob: c0f5093913ff97c6d17757f5b2c2fce3b78b1028 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Copyright 2022 Alejandro Colomar <alx@kernel.org>
// SPDX-License-Identifier:  LGPL-3.0-or-later WITH LGPL-3.0-linking-exception


#ifndef INCLUDE_C_MEM_CMP_MEMCMP_H_
#define INCLUDE_C_MEM_CMP_MEMCMP_H_


#include <stddef.h>
#include <string.h>


#pragma clang assume_nonnull begin
inline int c_memcmp(const void *a, const void *b, size_t sz);


inline int
c_memcmp(const void *a, const void *b, size_t sz)
{
	return memcmp(a, b, sz);
}
#pragma clang assume_nonnull end


#endif  // Header guard