diff options
author | Stefan Metzmacher <metze@samba.org> | 2010-10-22 14:41:47 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2010-10-23 08:49:29 +0200 |
commit | 96601cab1cb0bd47051cd9fb30f0464c0734cb8a (patch) | |
tree | ccea55c0b9e96b6cfc100a115b0e53b77cae6d74 /lib | |
parent | d65896cc3c5e67508e295e6d64193210e958971c (diff) | |
download | samba-96601cab1cb0bd47051cd9fb30f0464c0734cb8a.tar.gz samba-96601cab1cb0bd47051cd9fb30f0464c0734cb8a.tar.bz2 samba-96601cab1cb0bd47051cd9fb30f0464c0734cb8a.zip |
lib/replace: use snprintf() in test code to avoid warnings in the IBM-Checker
metze
Diffstat (limited to 'lib')
-rw-r--r-- | lib/replace/test/os2_delete.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/replace/test/os2_delete.c b/lib/replace/test/os2_delete.c index 8b52837018..9d760bfdc2 100644 --- 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; - sprintf(fname, TESTDIR "/test%u.txt", i); + snprintf(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]; - sprintf(fname, TESTDIR "/%s", names[j]); + snprintf(fname, sizeof(fname), TESTDIR "/%s", names[j]); unlink(fname) == 0 || FAILED("unlink"); } |