diff options
Diffstat (limited to 'src/watch.c')
-rw-r--r-- | src/watch.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/watch.c b/src/watch.c index aeb3a30..1722fed 100644 --- a/src/watch.c +++ b/src/watch.c @@ -66,14 +66,14 @@ watch_init(void) /*! \brief Counts up memory used by watch list headers */ void -watch_count_memory(unsigned int *const count, uint64_t *const memory) +watch_count_memory(unsigned int *const count, uint64_t *const bytes) { - unsigned int idx; + unsigned int idx = 0; - for (idx = 0; idx < HASHSIZE; ++idx) - *count += dlink_list_length(&watchTable[idx]); + for (; idx < HASHSIZE; ++idx) + (*count) += dlink_list_length(&watchTable[idx]); - *memory = *count * sizeof(struct Watch); + (*bytes) = *count * sizeof(struct Watch); } /*! \brief Notifies all clients that have client_p's nick name on |