summaryrefslogtreecommitdiffstats
path: root/sharpd
diff options
context:
space:
mode:
Diffstat (limited to 'sharpd')
-rw-r--r--sharpd/sharp_nht.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sharpd/sharp_nht.c b/sharpd/sharp_nht.c
index 7484dd3b0..077e2b29e 100644
--- a/sharpd/sharp_nht.c
+++ b/sharpd/sharp_nht.c
@@ -77,7 +77,8 @@ struct sharp_nhg {
uint32_t id;
- char name[256];
+#define NHG_NAME_LEN 256
+ char name[NHG_NAME_LEN];
bool installed;
};
@@ -95,7 +96,7 @@ struct sharp_nhg_rb_head nhg_head;
static int sharp_nhg_compare_func(const struct sharp_nhg *a,
const struct sharp_nhg *b)
{
- return strncmp(a->name, b->name, strlen(a->name));
+ return strncmp(a->name, b->name, NHG_NAME_LEN);
}
DECLARE_RBTREE_UNIQ(sharp_nhg_rb, struct sharp_nhg, mylistitem,