JS_snprintf for portability, not snprintf (bustage fix).
authorBrendan Eich <brendan@mozilla.org>
Tue, 23 Sep 2008 00:59:59 -0700
changeset 19606 15aecdaab936f81b0ff03ac3764d604127767985
parent 19605 b222647a14cb9bb942b62c714511a324a7701ec9
child 19608 1ca0b62225b3c5057ffb352a2a455dd54b202b1a
child 19651 4efde28991572d9712c12ac8ba5662b417df9db2
push idunknown
push userunknown
push dateunknown
milestone1.9.1b1pre
JS_snprintf for portability, not snprintf (bustage fix).
js/src/jstracer.cpp
--- a/js/src/jstracer.cpp
+++ b/js/src/jstracer.cpp
@@ -148,17 +148,17 @@ jitstats_getProperty(JSContext *cx, JSOb
         return JS_TRUE;
     }
 
     if (result < JSVAL_INT_MAX) {
         *vp = INT_TO_JSVAL(result);
         return JS_TRUE;
     }
     char retstr[64];
-    snprintf(retstr, JS_ARRAY_LENGTH(retstr), "%llu", result);
+    JS_snprintf(retstr, sizeof retstr, "%llu", result);
     *vp = STRING_TO_JSVAL(JS_NewStringCopyZ(cx, retstr));
     return JS_TRUE;
 }
 
 JSClass jitstats_class = {
     "jitstats",
     JSCLASS_HAS_PRIVATE,
     JS_PropertyStub,       JS_PropertyStub,