Use workaround function for sprintf, if the return value of sprintf is needed

This commit is contained in:
Sascha Schumann 1999-12-19 02:12:31 +00:00
parent 497b3fe2c5
commit 63d4411560
2 changed files with 2 additions and 2 deletions

View File

@ -100,7 +100,7 @@ static char *_ps_files_path_create(char *buf, size_t buflen, ps_files *data, con
(strlen(data->basedir) + 2 * data->dirdepth + keylen + 5 + sizeof(FILE_PREFIX)))
return NULL;
p = key;
n = sprintf(buf, "%s/", data->basedir);
n = zend_sprintf(buf, "%s/", data->basedir);
for(i = 0; i < data->dirdepth; i++) {
buf[n++] = *p++;
buf[n++] = DIR_DELIMITER;

View File

@ -1607,7 +1607,7 @@ PHPAPI char *php_addcslashes(char *str, int length, int *new_length, int should_
case '\v': *target++ = 'v'; break;
case '\b': *target++ = 'b'; break;
case '\f': *target++ = 'f'; break;
default: target += sprintf(target, "%03o", (unsigned char)c);
default: target += zend_sprintf(target, "%03o", (unsigned char)c);
}
continue;
}