summaryrefslogtreecommitdiff
path: root/src/couchdb/couch_js.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/couchdb/couch_js.c')
-rw-r--r--src/couchdb/couch_js.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/couchdb/couch_js.c b/src/couchdb/couch_js.c
index 045e6c7f..d95b9db0 100644
--- a/src/couchdb/couch_js.c
+++ b/src/couchdb/couch_js.c
@@ -247,13 +247,13 @@ GC(JSContext *context, JSObject *obj, uintN argc, jsval *argv, jsval *rval) {
static JSBool
Print(JSContext *context, JSObject *obj, uintN argc, jsval *argv, jsval *rval) {
- uintN i, n;
+ uintN i;
size_t cl, bl;
JSString *str;
jschar *chars;
char *bytes;
- for (i = n = 0; i < argc; i++) {
+ for (i = 0; i < argc; i++) {
str = JS_ValueToString(context, argv[i]);
if (!str)
return JS_FALSE;
@@ -270,9 +270,8 @@ Print(JSContext *context, JSObject *obj, uintN argc, jsval *argv, jsval *rval) {
fprintf(stdout, "%s%s", i ? " " : "", bytes);
JS_free(context, bytes);
}
- n++;
- if (n)
- fputc('\n', stdout);
+
+ fputc('\n', stdout);
fflush(stdout);
return JS_TRUE;
}