Skip to content

Commit 3a1852a

Browse files
committed
Fix target name in cmake
1 parent 1ee246f commit 3a1852a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

libc/src/stdio/printf_core/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ else()
3939
endif()
4040

4141
set(target_error_mapper libc.src.stdio.printf_core.${LIBC_TARGET_OS}.error_mapper)
42-
if(NOT TARGET ${target_error_converter})
42+
if(NOT TARGET ${target_error_mapper})
4343
set(target_error_mapper libc.src.stdio.printf_core.generic.error_mapper)
4444
endif()
4545

libc/test/src/stdio/fprintf_test.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ TEST(LlvmLibcFPrintfTest, WriteToFile) {
8888
ASSERT_EQ(printf_test::fclose(file), 0);
8989
}
9090

91-
#ifndef LIBC_COPT_PRINTF_NO_NULLPTR_CHECKS
91+
#if !defined(LIBC_COPT_PRINTF_NO_NULLPTR_CHECKS) && \
92+
!defined(LIBC_COPT_PRINTF_DISABLE_WRITE_INT)
9293
TEST(LlvmLibcFPrintfTest, NullPtrCheck) {
9394
const char *FILENAME = APPEND_LIBC_TEST("fprintf_nullptr.test");
9495
auto FILE_PATH = libc_make_test_file_path(FILENAME);
@@ -97,7 +98,7 @@ TEST(LlvmLibcFPrintfTest, NullPtrCheck) {
9798
ASSERT_FALSE(file == nullptr);
9899

99100
int ret =
100-
LIBC_NAMESPACE::fprintf(file, "hello %s", static_cast<int *>(nullptr));
101+
LIBC_NAMESPACE::fprintf(file, "hello %n", static_cast<int *>(nullptr));
101102
EXPECT_LT(ret, 0);
102103
ASSERT_ERRNO_EQ(EINVAL);
103104

0 commit comments

Comments
 (0)