core: Prefer JS_AtomToCString() over JS_AtomToString() + JS_ToCString().
Some checks failed
Build Tilde Friends / Build-All (push) Has been cancelled
Some checks failed
Build Tilde Friends / Build-All (push) Has been cancelled
This commit is contained in:
@ -142,8 +142,7 @@ void tf_ssb_export(tf_ssb_t* ssb, const char* key)
|
||||
JSPropertyDescriptor desc;
|
||||
if (JS_GetOwnProperty(context, &desc, files, ptab[i].atom) == 1)
|
||||
{
|
||||
JSValue key = JS_AtomToString(context, ptab[i].atom);
|
||||
const char* file_name = JS_ToCString(context, key);
|
||||
const char* file_name = JS_AtomToCString(context, ptab[i].atom);
|
||||
const char* blob_id = JS_ToCString(context, desc.value);
|
||||
|
||||
uint8_t* file_blob = NULL;
|
||||
@ -156,7 +155,6 @@ void tf_ssb_export(tf_ssb_t* ssb, const char* key)
|
||||
}
|
||||
|
||||
JS_FreeCString(context, file_name);
|
||||
JS_FreeValue(context, key);
|
||||
JS_FreeCString(context, blob_id);
|
||||
JS_FreeValue(context, desc.value);
|
||||
JS_FreeValue(context, desc.setter);
|
||||
|
Reference in New Issue
Block a user