diff options
author | Gerald Carter <jerry@samba.org> | 2003-07-23 12:33:59 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2003-07-23 12:33:59 +0000 |
commit | 3a5dc7c2ecacecf7dd0cfd71ff1bb298d70b391b (patch) | |
tree | 431c515b374806d4fd4f5dbb4f60a055d1e7c441 /source3/utils | |
parent | 490fcdd199aed91a6e982911bd1ff5019b340b4d (diff) | |
download | samba-3a5dc7c2ecacecf7dd0cfd71ff1bb298d70b391b.tar.gz samba-3a5dc7c2ecacecf7dd0cfd71ff1bb298d70b391b.tar.bz2 samba-3a5dc7c2ecacecf7dd0cfd71ff1bb298d70b391b.zip |
convert snprintf() calls using pstrings & fstrings
to pstr_sprintf() and fstr_sprintf() to try to standardize.
lots of snprintf() calls were using len-1; some were using
len. At least this helps to be consistent.
(This used to be commit 9f835b85dd38cbe655eb19021ff763f31886ac00)
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/net_time.c | 4 | ||||
-rw-r--r-- | source3/utils/ntlm_auth.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/source3/utils/net_time.c b/source3/utils/net_time.c index 40619a0796..45c1783805 100644 --- a/source3/utils/net_time.c +++ b/source3/utils/net_time.c @@ -71,12 +71,12 @@ static time_t nettime(int *zone) /* return a time as a string ready to be passed to /bin/date */ static char *systime(time_t t) { - static char s[100]; + static fstring s; struct tm *tm; tm = localtime(&t); - snprintf(s, sizeof(s), "%02d%02d%02d%02d%04d.%02d", + fstr_sprintf(s, "%02d%02d%02d%02d%04d.%02d", tm->tm_mon+1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_year + 1900, tm->tm_sec); return s; diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c index 3dfa157bda..a84f9b30f5 100644 --- a/source3/utils/ntlm_auth.c +++ b/source3/utils/ntlm_auth.c @@ -1372,7 +1372,7 @@ enum { } else { fstring user; - snprintf(user, sizeof(user)-1, "%s%c%s", opt_domain, winbind_separator(), opt_username); + fstr_sprintf(user, "%s%c%s", opt_domain, winbind_separator(), opt_username); if (!check_plaintext_auth(user, opt_password, True)) { exit(1); } |