Skip to content

Commit

Permalink
adds statics
Browse files Browse the repository at this point in the history
Signed-off-by: Roshan Khatri <[email protected]>
  • Loading branch information
roshkhatri committed Jul 23, 2024
1 parent 7fb234b commit b11b014
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/cluster_legacy.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,19 +196,19 @@ typedef struct {
};
} ClusterNodeIterator;

void clusterNodeIterInitAllNodes(ClusterNodeIterator *iter) {
static void clusterNodeIterInitAllNodes(ClusterNodeIterator *iter) {
iter->type = ITER_DICT;
dictInitSafeIterator(&iter->di, server.cluster->nodes);
}

void clusterNodeIterInitMyShard(ClusterNodeIterator *iter) {
static void clusterNodeIterInitMyShard(ClusterNodeIterator *iter) {
list *nodes = clusterGetNodesInMyShard(server.cluster->myself);
serverAssert(nodes != NULL);
iter->type = ITER_LIST;
listRewind(nodes, &iter->li);
}

clusterNode *clusterNodeIterNext(ClusterNodeIterator *iter) {
static clusterNode *clusterNodeIterNext(ClusterNodeIterator *iter) {
switch (iter->type) {
case ITER_DICT: {
/* Get the next entry in the dictionary */
Expand All @@ -230,7 +230,7 @@ clusterNode *clusterNodeIterNext(ClusterNodeIterator *iter) {
}
}

void clusterNodeIterReset(ClusterNodeIterator *iter) {
static void clusterNodeIterReset(ClusterNodeIterator *iter) {
if (iter->type == ITER_DICT) {
dictResetIterator(&iter->di);
}
Expand Down

0 comments on commit b11b014

Please sign in to comment.