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:
@ -3,16 +3,13 @@
|
||||
#include "log.h"
|
||||
#include "mem.h"
|
||||
#include "ssb.h"
|
||||
#include "util.js.h"
|
||||
|
||||
#include "sqlite3.h"
|
||||
#include "uv.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#if !defined(_countof)
|
||||
#define _countof(a) ((int)(sizeof((a)) / sizeof(*(a))))
|
||||
#endif
|
||||
|
||||
typedef struct _tf_ssb_connections_t
|
||||
{
|
||||
tf_ssb_t* ssb;
|
||||
@ -116,8 +113,8 @@ static void _tf_ssb_connections_timer(uv_timer_t* timer)
|
||||
{
|
||||
tf_ssb_connections_t* connections = timer->data;
|
||||
tf_ssb_connection_t* active[4];
|
||||
int count = tf_ssb_get_connections(connections->ssb, active, _countof(active));
|
||||
if (count < (int)_countof(active))
|
||||
int count = tf_ssb_get_connections(connections->ssb, active, tf_countof(active));
|
||||
if (count < tf_countof(active))
|
||||
{
|
||||
tf_ssb_connections_get_next_t* next = tf_malloc(sizeof(tf_ssb_connections_get_next_t));
|
||||
*next = (tf_ssb_connections_get_next_t) {
|
||||
|
Reference in New Issue
Block a user