Skip to content

Commit 556389d

Browse files
committed
format
1 parent 7489a49 commit 556389d

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

fuzzing/fuzz_local/base58_fuzzer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include <stddef.h>
22
#include <stdint.h>
33
#include <string.h>
4+
45
#include <vector>
56

67
extern "C" {

include/zxformat.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ extern "C" {
2020
#endif
2121

2222
#include <stdbool.h>
23+
2324
#include "zxerror.h"
2425
#include "zxmacros.h"
2526

@@ -123,7 +124,7 @@ __Z_INLINE uint64_t parse_digits_to_uint64(const char *start, const char *end, u
123124
if (error != NULL) {
124125
*error = 0;
125126
}
126-
127+
127128
uint64_t value = 0;
128129
bool has_digits = false;
129130

@@ -167,7 +168,7 @@ __Z_INLINE int8_t str_to_int8(const char *start, const char *end, char *error) {
167168

168169
const uint64_t limit = (sign < 0) ? ((uint64_t)INT64_MAX + 1u) : (uint64_t)INT64_MAX;
169170
uint64_t value = parse_digits_to_uint64(start, end, limit, error);
170-
171+
171172
// If parsing failed, error is already set by the helper function
172173
if (error != NULL && *error != 0) {
173174
return 0;
@@ -202,7 +203,7 @@ __Z_INLINE int64_t str_to_int64(const char *start, const char *end, char *error)
202203

203204
const uint64_t limit = (sign < 0) ? ((uint64_t)INT64_MAX + 1u) : (uint64_t)INT64_MAX;
204205
uint64_t value = parse_digits_to_uint64(start, end, limit, error);
205-
206+
206207
// If parsing failed, error is already set by the helper function
207208
if (error != NULL && *error != 0) {
208209
return 0;

tests/macros.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -437,23 +437,23 @@ TEST(STR_TO_INT8, DummyData_Negative) {
437437
}
438438

439439
TEST(STR_TO_INT8, EmptyString) {
440-
const char* empty = "";
440+
const char *empty = "";
441441
char error = 0;
442442
int8_t result = str_to_int8(empty, empty, &error);
443443
EXPECT_EQ(0, result);
444444
EXPECT_EQ(1, error); // Should set error flag for empty string
445445
}
446446

447447
TEST(STR_TO_INT8, JustMinusSign) {
448-
const char* just_minus = "-";
448+
const char *just_minus = "-";
449449
char error = 0;
450450
int8_t result = str_to_int8(just_minus, just_minus + 1, &error);
451451
EXPECT_EQ(0, result);
452452
EXPECT_EQ(1, error); // Should set error flag for just minus sign
453453
}
454454

455455
TEST(STR_TO_INT8, NoDigits) {
456-
const char* no_digits = "abc";
456+
const char *no_digits = "abc";
457457
char error = 0;
458458
int8_t result = str_to_int8(no_digits, no_digits + 3, &error);
459459
EXPECT_EQ(0, result);
@@ -543,15 +543,15 @@ TEST(STR_TO_INT64, MixedInvalidCharacters) {
543543
}
544544

545545
TEST(STR_TO_INT64, EmptyString) {
546-
const char* empty = "";
546+
const char *empty = "";
547547
char error = 0;
548548
int64_t result = str_to_int64(empty, empty, &error);
549549
EXPECT_EQ(0, result);
550550
EXPECT_EQ(1, error); // Should set error flag for empty string
551551
}
552552

553553
TEST(STR_TO_INT64, JustMinusSign) {
554-
const char* just_minus = "-";
554+
const char *just_minus = "-";
555555
char error = 0;
556556
int64_t result = str_to_int64(just_minus, just_minus + 1, &error);
557557
EXPECT_EQ(0, result);

0 commit comments

Comments
 (0)