mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-12-02 16:40:53 +01:00
53332, 53334: Avoid strlen calls after sprintf
This commit is contained in:
parent
4f3d69e2a0
commit
f7b5cc431b
6 changed files with 27 additions and 33 deletions
|
|
@ -236,9 +236,8 @@ statprint(struct stat *sbuf, char *outbuf, char *fname, int iwhich, int flags)
|
|||
char *optr = outbuf;
|
||||
|
||||
if (flags & STF_NAME) {
|
||||
sprintf(outbuf, (flags & (STF_PICK|STF_ARRAY)) ?
|
||||
optr += sprintf(outbuf, (flags & (STF_PICK|STF_ARRAY)) ?
|
||||
"%s " : "%-8s", statelts[iwhich]);
|
||||
optr += strlen(outbuf);
|
||||
}
|
||||
*optr = '\0';
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue