On Tue, 15 Aug 2023 20:02:34 -0400 Steven Rostedt <rostedt@xxxxxxxxxxx> wrote: > @@ -171,15 +171,23 @@ struct traceeval *traceeval_init(struct traceeval_type *keys, > > void traceeval_release(struct traceeval *teval); > > -int traceeval_insert(struct traceeval *teval, > - const struct traceeval_data *keys, > - const struct traceeval_data *vals); > +int traceeval_insert_size(struct traceeval *teval, > + const struct traceeval_data *keys, size_t nr_keys, > + const struct traceeval_data *vals, size_t nr_vals); > + > +#define traceeval_insert(teval, keys, vals) \ > + traceeval_insert_size(teval, keys, sizeof(keys) / sizeof(keys[0]), \ > + vals, sizeof(vals) / sizeof(vals[0])) > I just realized that vals may be NULL, so the above needs to be: #define traceeval_insert(teval, keys, vals) \ traceeval_insert_size(teval, keys, sizeof(keys) / sizeof(keys[0]), \ vals, vals ? sizeof(vals) / sizeof(vals[0]) : 0) -- Steve