small edits
[iotcloud.git] / version2 / src / C / hashtable.h
old mode 100644 (file)
new mode 100755 (executable)
index 868060c..439e48b
@@ -132,17 +132,6 @@ public:
                tail = list = NULL;
        }
 
-       /** Doesn't work with zero value */
-       _Val getRandomValue() {
-               while (true) {
-                       unsigned int index = random() & capacitymask;
-                       struct Hashlistnode<_Key, _Val> *bin = &table[index];
-                       if (bin->key != NULL && bin->val != NULL) {
-                               return bin->val;
-                       }
-               }
-       }
-
        void resetAndDeleteKeys() {
                for (unsigned int i = 0; i < capacity; i++) {
                        struct Hashlistnode<_Key, _Val> *bin = &table[i];
@@ -412,7 +401,6 @@ public:
                unsigned int oldcapacity = capacity;
 
                if ((newtable = (struct Hashlistnode<_Key, _Val> *)ourcalloc(newsize, sizeof(struct Hashlistnode<_Key, _Val>))) == NULL) {
-                       model_print("calloc error %s %d\n", __FILE__, __LINE__);
                        exit(EXIT_FAILURE);
                }