Skip to content

Commit 0b1c536

Browse files
willieyzhanno-becker
authored andcommitted
Consolidate inclusion of <string.h> via common.h
While consolidating <stdint.h> includes, we observed that <string.h> is already transitively included through common.h. However, many source files still explicitly included <string.h>. This change removes redundant <string.h> includes across the codebase and standardizes include order by placing the corresponding foo.h at the top of each foo.c, following the convention used in mlkem-native. Signed-off-by: willieyz <willie.zhao@chelpis.com>
1 parent d32f6c3 commit 0b1c536

29 files changed

Lines changed: 5 additions & 35 deletions

dev/fips202/armv81m/mve.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#define MLD_FIPS202_ARMV81M_NEED_X4
1616

1717
#if !defined(__ASSEMBLER__)
18-
#include <stdint.h>
1918
#include "../api.h"
2019

2120
#define mld_keccak_f1600_x4_native_impl \

dev/fips202/armv81m/src/fips202_native_armv81m.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#ifndef MLD_DEV_FIPS202_ARMV81M_SRC_FIPS202_NATIVE_ARMV81M_H
77
#define MLD_DEV_FIPS202_ARMV81M_SRC_FIPS202_NATIVE_ARMV81M_H
88

9-
#include <stdint.h>
109
#include "../../../../common.h"
1110

1211
/* Keccak round constants in bit-interleaved form */

dev/fips202/armv81m/src/keccak_f1600_x4_mve.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#if defined(MLD_FIPS202_ARMV81M_NEED_X4) && \
1111
!defined(MLD_CONFIG_MULTILEVEL_NO_SHARED)
1212

13-
#include <stdint.h>
1413
#include "fips202_native_armv81m.h"
1514

1615
/*

dev/fips202/armv81m/src/keccakf1600_round_constants.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
#if defined(MLD_FIPS202_ARMV81M_NEED_X4) && \
1010
!defined(MLD_CONFIG_MULTILEVEL_NO_SHARED)
1111

12-
#include <stdint.h>
13-
1412
#include "fips202_native_armv81m.h"
1513

1614
/*

dev/x86_64/src/poly_decompose_32_avx2.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
(MLD_CONFIG_PARAMETER_SET == 65 || MLD_CONFIG_PARAMETER_SET == 87))
3030

3131
#include <immintrin.h>
32-
#include <string.h>
3332
#include "arith_native_x86_64.h"
3433
#include "consts.h"
3534

dev/x86_64/src/poly_decompose_88_avx2.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
MLD_CONFIG_PARAMETER_SET == 44)
3030

3131
#include <immintrin.h>
32-
#include <string.h>
3332
#include "arith_native_x86_64.h"
3433
#include "consts.h"
3534

dev/x86_64/src/poly_use_hint_32_avx2.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
(MLD_CONFIG_PARAMETER_SET == 65 || MLD_CONFIG_PARAMETER_SET == 87))
2626

2727
#include <immintrin.h>
28-
#include <string.h>
2928
#include "arith_native_x86_64.h"
3029
#include "consts.h"
3130

dev/x86_64/src/poly_use_hint_88_avx2.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
MLD_CONFIG_PARAMETER_SET == 44)
2626

2727
#include <immintrin.h>
28-
#include <string.h>
2928
#include "arith_native_x86_64.h"
3029
#include "consts.h"
3130

dev/x86_64/src/rej_uniform_avx2.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
!defined(MLD_CONFIG_MULTILEVEL_NO_SHARED)
2424

2525
#include <immintrin.h>
26-
#include <string.h>
2726
#include "arith_native_x86_64.h"
2827
#include "consts.h"
2928

dev/x86_64/src/rej_uniform_eta2_avx2.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
(defined(MLD_CONFIG_MULTILEVEL_WITH_SHARED) || MLDSA_ETA == 2)
2525

2626
#include <immintrin.h>
27-
#include <string.h>
2827
#include "arith_native_x86_64.h"
2928
#include "consts.h"
3029

0 commit comments

Comments
 (0)