Skip to content

Commit e764f34

Browse files
authored
Merge pull request #373 from adierking/snprintf
Use snprintf instead of _snprintf on Windows
2 parents 631821c + 78efcd4 commit e764f34

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,7 @@ _dispatch_ktrace_impl(uint32_t code, uint64_t a, uint64_t b,
939939
dispatch_assert(_length != -1); \
940940
_msg = (char *)malloc((unsigned)_length + 1); \
941941
dispatch_assert(_msg); \
942-
_snprintf(_msg, (unsigned)_length, "%s" fmt, DISPATCH_ASSERTION_FAILED_MESSAGE, ##__VA_ARGS__); \
942+
snprintf(_msg, (unsigned)_length + 1, "%s" fmt, DISPATCH_ASSERTION_FAILED_MESSAGE, ##__VA_ARGS__); \
943943
_dispatch_assert_crash(_msg); \
944944
free(_msg); \
945945
} while (0)

src/shims/generic_win_stubs.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ typedef __typeof__(_Generic((__SIZE_TYPE__)0, \
4444
#define O_NONBLOCK 04000
4545

4646
#define bzero(ptr,len) memset((ptr), 0, (len))
47-
#define snprintf _snprintf
4847

4948
#endif
5049

0 commit comments

Comments
 (0)