blob: 361412ec6268fe7f4a933e734e0016e65e7e9a1d [file] [log] [blame]
Jeff Thompson2e0e0882013-08-12 17:55:13 -07001/**
2 * @author: Jeff Thompson
3 * See COPYING for copyright and distribution information.
4 */
5
6#include "util/ndn_memory.h"
7#include "interest.h"
8
9int ndn_Exclude_compareComponents(struct ndn_NameComponent *component1, struct ndn_NameComponent *component2)
10{
11 if (component1->valueLength < component2->valueLength)
12 return -1;
13 if (component1->valueLength > component2->valueLength)
14 return 1;
15
16 // The components are equal length. Just do a byte compare.
17 return ndn_memcmp(component1->value, component2->value, component1->valueLength);
18}