Skip to content

Commit a63d4cb

Browse files
committed
refactor: use <cstdlib> over stdlib.h
We currently use both. Consolidate on the former.
1 parent 100949a commit a63d4cb

22 files changed

+23
-24
lines changed

src/consensus/consensus.h

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

9-
#include <stdlib.h>
9+
#include <cstdlib>
1010
#include <stdint.h>
1111

1212
/** The maximum allowed size for a serialized block, in bytes (only for buffer size limits) */

src/crypto/chacha20.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
#ifndef BITCOIN_CRYPTO_CHACHA20_H
66
#define BITCOIN_CRYPTO_CHACHA20_H
77

8+
#include <cstdlib>
89
#include <stdint.h>
9-
#include <stdlib.h>
1010

1111
/** A class for ChaCha20 256-bit stream cipher developed by Daniel J. Bernstein
1212
https://cr.yp.to/chacha/chacha-20080128.pdf */

src/crypto/hkdf_sha256_32.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
#include <crypto/hmac_sha256.h>
99

10+
#include <cstdlib>
1011
#include <stdint.h>
11-
#include <stdlib.h>
1212

1313
/** A rfc5869 HKDF implementation with HMAC_SHA256 and fixed key output length of 32 bytes (L=32) */
1414
class CHKDF_HMAC_SHA256_L32

src/crypto/hmac_sha256.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
#include <crypto/sha256.h>
99

10+
#include <cstdlib>
1011
#include <stdint.h>
11-
#include <stdlib.h>
1212

1313
/** A hasher class for HMAC-SHA-256. */
1414
class CHMAC_SHA256

src/crypto/hmac_sha512.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
#include <crypto/sha512.h>
99

10+
#include <cstdlib>
1011
#include <stdint.h>
11-
#include <stdlib.h>
1212

1313
/** A hasher class for HMAC-SHA-512. */
1414
class CHMAC_SHA512

src/crypto/poly1305.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
#ifndef BITCOIN_CRYPTO_POLY1305_H
66
#define BITCOIN_CRYPTO_POLY1305_H
77

8+
#include <cstdlib>
89
#include <stdint.h>
9-
#include <stdlib.h>
1010

1111
#define POLY1305_KEYLEN 32
1212
#define POLY1305_TAGLEN 16

src/crypto/ripemd160.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
#ifndef BITCOIN_CRYPTO_RIPEMD160_H
66
#define BITCOIN_CRYPTO_RIPEMD160_H
77

8+
#include <cstdlib>
89
#include <stdint.h>
9-
#include <stdlib.h>
1010

1111
/** A hasher class for RIPEMD-160. */
1212
class CRIPEMD160

src/crypto/sha1.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
#ifndef BITCOIN_CRYPTO_SHA1_H
66
#define BITCOIN_CRYPTO_SHA1_H
77

8+
#include <cstdlib>
89
#include <stdint.h>
9-
#include <stdlib.h>
1010

1111
/** A hasher class for SHA1. */
1212
class CSHA1

src/crypto/sha256.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
#ifndef BITCOIN_CRYPTO_SHA256_H
66
#define BITCOIN_CRYPTO_SHA256_H
77

8+
#include <cstdlib>
89
#include <stdint.h>
9-
#include <stdlib.h>
1010
#include <string>
1111

1212
/** A hasher class for SHA-256. */

src/crypto/sha256_sse4.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
// This is a translation to GCC extended asm syntax from YASM code by Intel
66
// (available at the bottom of this file).
77

8+
#include <cstdlib>
89
#include <stdint.h>
9-
#include <stdlib.h>
1010

1111
#if defined(__x86_64__) || defined(__amd64__)
1212

0 commit comments

Comments
 (0)