Use PR_snprintf instead of snprintf.

Fixing hpux tinderbox bustage.
This commit is contained in:
seawood%netscape.com 2002-08-15 21:09:40 +00:00
Родитель 8fce80a722
Коммит 2ba330b480
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -58,6 +58,7 @@
#endif /* !NS_BUILD_ID */
#include "prenv.h"
#include "prprf.h"
#include <locale.h>
#include <limits.h>
@ -65,7 +66,6 @@
#ifdef VMS
#include <stdlib.h>
#include "prprf.h"
#endif
/* This is deprecated but we still need it until all platforms set the paper name in nsIPrintSettings... */
@ -390,7 +390,7 @@ nsPostScriptObj::Init( nsIDeviceContextSpecPS *aSpec )
* static buffer again.
*/
PR_SetEnv("MOZ_PRINTER_NAME=dummy_value_to_make_putenv_happy");
PRInt32 nchars = snprintf(envvar, ARG_MAX,
PRInt32 nchars = PR_snprintf(envvar, ARG_MAX,
"MOZ_PRINTER_NAME=%s", printername);
if (nchars < 0 || nchars >= ARG_MAX)
sprintf(envvar, "MOZ_PRINTER_NAME=");