diff options
author | deraadt <> | 2021-09-02 09:46:21 +0000 |
---|---|---|
committer | deraadt <> | 2021-09-02 09:46:21 +0000 |
commit | 6f87de04622fcde11242db697d6022a8a3513cbd (patch) | |
tree | 9f071c76285b6aed7529bd606722bccb9071e84d | |
parent | 032a922b0ec803ebabe7fc26e2ff44d5f29b799b (diff) | |
download | openbsd-6f87de04622fcde11242db697d6022a8a3513cbd.tar.gz openbsd-6f87de04622fcde11242db697d6022a8a3513cbd.tar.bz2 openbsd-6f87de04622fcde11242db697d6022a8a3513cbd.zip |
delete %n using test cases, which now intentionally fault
spotted by anton
-rw-r--r-- | src/regress/lib/libc/sprintf/sprintf_test.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/regress/lib/libc/sprintf/sprintf_test.c b/src/regress/lib/libc/sprintf/sprintf_test.c index 61c58f2f09..0cdd170911 100644 --- a/src/regress/lib/libc/sprintf/sprintf_test.c +++ b/src/regress/lib/libc/sprintf/sprintf_test.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sprintf_test.c,v 1.4 2004/09/18 19:31:32 otto Exp $ */ | 1 | /* $OpenBSD: sprintf_test.c,v 1.5 2021/09/02 09:46:21 deraadt Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2003 Theo de Raadt | 4 | * Copyright (c) 2003 Theo de Raadt |
@@ -86,17 +86,5 @@ main(int argc, char *argv[]) | |||
86 | 86 | ||
87 | if (strcmp(buf, correct) != 0) | 87 | if (strcmp(buf, correct) != 0) |
88 | exit(1); | 88 | exit(1); |
89 | |||
90 | sz1 = (size_t)1; | ||
91 | sz2 = (size_t)-1; | ||
92 | p1 = (ptrdiff_t)1; | ||
93 | p2 = (ptrdiff_t)-1; | ||
94 | snprintf(buf, sizeof buf, | ||
95 | "%zx %d %zd %d %zu %d %tx %d %td %d %tu %zn %tn\n" | ||
96 | "%1$zx %3$zd %5$zu %7$tx %9$td %11$tu %14$zn %15$tn\n", | ||
97 | sz1, 0, sz2, 1, sz1, 2, p1, 3, p2, 4, p1, &sz3, &p3, &sz4, &p4); | ||
98 | if (strcmp(buf, correct2) != 0 || sz3 != 24 || p3 != 25 || | ||
99 | sz4 != 40 || p4 != 41) | ||
100 | exit(1); | ||
101 | exit(0); | 89 | exit(0); |
102 | } | 90 | } |