git.samba.org
/
sfrench
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d65896c
)
lib/replace: use snprintf() in test code to avoid warnings in the IBM-Checker
author
Stefan Metzmacher
<metze@samba.org>
Fri, 22 Oct 2010 12:41:47 +0000
(14:41 +0200)
committer
Stefan Metzmacher
<metze@samba.org>
Sat, 23 Oct 2010 06:49:29 +0000
(08:49 +0200)
metze
lib/replace/test/os2_delete.c
patch
|
blob
|
history
diff --git
a/lib/replace/test/os2_delete.c
b/lib/replace/test/os2_delete.c
index 8b52837018d9387323275fb6ef2fd6eff3b39202..9d760bfdc2f30c5754ca5d076d879612525ee48d 100644
(file)
--- a/
lib/replace/test/os2_delete.c
+++ b/
lib/replace/test/os2_delete.c
@@
-46,7
+46,7
@@
static void create_files(void)
for (i=0;i<NUM_FILES;i++) {
char fname[40];
int fd;
- s
printf(fname
, TESTDIR "/test%u.txt", i);
+ s
nprintf(fname, sizeof(fname)
, TESTDIR "/test%u.txt", i);
fd = open(fname, O_CREAT|O_RDWR, 0600);
if (fd < 0) {
FAILED("open");
@@
-79,7
+79,7
@@
static int os2_delete(DIR *d)
/* delete the first few */
for (j=0; j<MIN(i, DELETE_SIZE); j++) {
char fname[40];
- s
printf(fname
, TESTDIR "/%s", names[j]);
+ s
nprintf(fname, sizeof(fname)
, TESTDIR "/%s", names[j]);
unlink(fname) == 0 || FAILED("unlink");
}