Simplify redundant initializers for JS_NewBool()

This commit is contained in:
Charlie Gordon
2024-03-23 09:28:38 +01:00
parent 06651314f5
commit c0e67c47cd
2 changed files with 18 additions and 19 deletions

View File

@@ -1687,7 +1687,7 @@ static JSValue js_os_isatty(JSContext *ctx, JSValueConst this_val,
int fd;
if (JS_ToInt32(ctx, &fd, argv[0]))
return JS_EXCEPTION;
return JS_NewBool(ctx, (isatty(fd) != 0));
return JS_NewBool(ctx, isatty(fd));
}
#if defined(_WIN32)