]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: Macro for number of entries in hash table
authorvivek <vivek@cumulusnetworks.com>
Mon, 15 May 2017 05:17:45 +0000 (22:17 -0700)
committervivek <vivek@cumulusnetworks.com>
Thu, 25 May 2017 17:20:03 +0000 (10:20 -0700)
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
lib/hash.h

index bafb35a2a3b14e7e51af1d1ce53b3ae5d8b0a393..319ba9f7f9eaef4287461e014e9510e818870931 100644 (file)
@@ -66,6 +66,8 @@ struct hash
   unsigned long count;
 };
 
+#define hashcount(X) ((X)->count)
+
 extern struct hash *hash_create (unsigned int (*) (void *), 
                                 int (*) (const void *, const void *));
 extern struct hash *hash_create_size (unsigned int, unsigned int (*) (void *),