cleanup: Consolidate countof macros.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 20m32s
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 20m32s
This commit is contained in:
@ -20,10 +20,6 @@
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#if !defined(_countof)
|
||||
#define _countof(a) ((int)(sizeof((a)) / sizeof(*(a))))
|
||||
#endif
|
||||
|
||||
static const int k_sql_async_timeout_ms = 60 * 1000;
|
||||
|
||||
static JSClassID _tf_ssb_classId;
|
||||
@ -271,7 +267,7 @@ static JSValue _set_server_following_internal(tf_ssb_t* ssb, JSValueConst this_v
|
||||
server_id,
|
||||
message,
|
||||
};
|
||||
JSValue result = _tf_ssb_appendMessageWithIdentity(context, this_val, _countof(args), args);
|
||||
JSValue result = _tf_ssb_appendMessageWithIdentity(context, this_val, tf_countof(args), args);
|
||||
JS_FreeValue(context, server_id);
|
||||
JS_FreeValue(context, server_user);
|
||||
JS_FreeValue(context, message);
|
||||
@ -1088,7 +1084,7 @@ static JSValue _tf_ssb_connections(JSContext* context, JSValueConst this_val, in
|
||||
if (ssb)
|
||||
{
|
||||
tf_ssb_connection_t* connections[32];
|
||||
int count = tf_ssb_get_connections(ssb, connections, _countof(connections));
|
||||
int count = tf_ssb_get_connections(ssb, connections, tf_countof(connections));
|
||||
|
||||
result = JS_NewArray(context);
|
||||
for (int i = 0; i < count; i++)
|
||||
|
Reference in New Issue
Block a user