Skip to content
Snippets Groups Projects
Commit 8877f8f0 authored by Thomas Jahns's avatar Thomas Jahns :cartwheel:
Browse files

Save pointer indirection.

parent 42e32715
No related branches found
No related tags found
No related merge requests found
......@@ -42,9 +42,10 @@ cdi_att_t *find_att(cdi_atts_t *attsp, const char *name)
size_t slen = strlen(name);
cdi_att_t *atts = attsp->value;
for (size_t attid = 0; attid < attsp->nelems; attid++)
{
cdi_att_t *attp = &(attsp->value[attid]);
cdi_att_t *attp = atts + attid;
if (attp->namesz == slen
&& memcmp(attp->name, name, slen) == 0)
return (attp); /* Normal return */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment