Code auditing weekend results and fixes committing.
[silc.git] / lib / silccore / id.h
index 56551c4ae02e2e236eb94209f536be183d76dc7c..abd89e0d0b81fd12440c41b71271df813d0d2a4d 100644 (file)
@@ -42,7 +42,7 @@
 #define SILC_ID_CHANNEL 3
 
 /* Type definition for the ID types. */
-typedef unsigned char SilcIdType;
+typedef unsigned short SilcIdType;
 
 /* 
    64 bit SilcServerID structure:
@@ -105,12 +105,12 @@ typedef struct {
   SILC_ID_COMPARE(id1, id2, 4)
 
 /* 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(id, _hash) \
+  memcmp(id->hash, _hash, CLIENTID_HASH_LEN)
 
 /* Prototypes */
 unsigned char *silc_id_id2str(void *id, SilcIdType type);
-void *silc_id_str2id(unsigned char *id, SilcIdType type);
+void *silc_id_str2id(unsigned char *id, unsigned int id_len, SilcIdType type);
 unsigned int silc_id_get_len(SilcIdType type);
 
 #endif