From e82f8ea565a68aa1fa980cb12c1f136b1d4a57f9 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 13 Jul 2015 15:18:52 -0700 Subject: Geo taxonomy: correctly store / update the categories Don't throw away data unless new data has been received. And don't store multiple copies of the same category. And most importantly, never write past the end of the array. Signed-off-by: Dirk Hohndel --- taxonomy.h | 1 + 1 file changed, 1 insertion(+) (limited to 'taxonomy.h') diff --git a/taxonomy.h b/taxonomy.h index bc42c6119..51245d562 100644 --- a/taxonomy.h +++ b/taxonomy.h @@ -33,6 +33,7 @@ struct taxonomy_data { struct taxonomy *alloc_taxonomy(); void free_taxonomy(struct taxonomy_data *t); +int taxonomy_index_for_category(struct taxonomy_data *t, enum taxonomy_category cat); #ifdef __cplusplus } -- cgit v1.2.3-70-g09d2