Skip to content

Commit 4335e49

Browse files
committed
c: move snprintf to lkmc
1 parent 853c791 commit 4335e49

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

c/stdio_h.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -112,24 +112,6 @@ int main(void) {
112112
assert(strcmp(cs, cs2) == 0);
113113
}
114114

115-
#if __STDC_VERSION__ >= 199901L
116-
/*
117-
# snprintf
118-
119-
Like `sprintf`, but writes at most n bytes, so it is safer,
120-
because it may not be possible or easy to calculate the resulting
121-
size of a formated string.
122-
123-
The size given *includes* the null terminator.
124-
*/
125-
{
126-
char cs[] = "123";
127-
char cs2[3];
128-
snprintf(cs2, 3, "%s", cs);
129-
assert(strcmp(cs2, "12") == 0);
130-
}
131-
#endif
132-
133115
/*
134116
# fprintf
135117

0 commit comments

Comments
 (0)