updates.
[silc.git] / lib / silccore / id.h
index 6a1034dffd612204bde3ccdd4e78a260f3d759fd..114583bbce62de8919481488e491915bd5800154 100644 (file)
@@ -52,7 +52,7 @@ typedef uint16 SilcIdType;
    ID depends of the length of the IP address.
 */
 typedef struct {
-  unsigned char data[16];      /* IP data */
+  unsigned char data[16];      /* IP data (in MSB first order) */
   uint8 data_len;              /* Length of the data (4 or 16) */
 } SilcIDIP;
 
@@ -119,8 +119,8 @@ typedef struct {
    SILC_ID_CHANNEL_COMPARE(id1, id2))
 
 /* Compare nickname hash from Client ID */
-#define SILC_ID_COMPARE_HASH(id, _hash) \
-  memcmp(id->hash, _hash, CLIENTID_HASH_LEN)
+#define SILC_ID_COMPARE_HASH(id1, id2) \
+  (!memcmp((id1)->hash, (id2)->hash, CLIENTID_HASH_LEN))
 
 /* Prototypes */
 unsigned char *silc_id_id2str(void *id, SilcIdType type);