These two conditionals (one !regex &&, the other regex &&) would be clearer as:  <code>
if (regex ? !FullTextMatch(ctx, buf, ip->name) : strcmp(buf, ip->name)) { return false; }
</code>