Skip to content

Commit 6714d8c

Browse files
committed
broker: reduce scope of some modhash funcs
Problem: modhash_add() and modhash_remove() are now only used internally in modhash.c, yet they have global scope. Declare them static.
1 parent cb0883f commit 6714d8c

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/broker/modhash.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ int modhash_response_sendmsg_new (modhash_t *mh, flux_msg_t **msg)
5757
return module_sendmsg_new (p, msg);
5858
}
5959

60-
void modhash_add (modhash_t *mh, module_t *p)
60+
static void modhash_add (modhash_t *mh, module_t *p)
6161
{
6262
int rc;
6363

@@ -68,7 +68,7 @@ void modhash_add (modhash_t *mh, module_t *p)
6868
(zhash_free_fn *)module_destroy);
6969
}
7070

71-
void modhash_remove (modhash_t *mh, module_t *p)
71+
static void modhash_remove (modhash_t *mh, module_t *p)
7272
{
7373
zhash_delete (mh->zh_byuuid, module_get_uuid (p));
7474
}

src/broker/modhash.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ typedef struct modhash modhash_t;
2828
modhash_t *modhash_create (struct broker *ctx);
2929
int modhash_destroy (modhash_t *mh);
3030

31-
void modhash_add (modhash_t *mh, module_t *p);
32-
void modhash_remove (modhash_t *mh, module_t *p);
33-
3431
/* Send an event message to all modules that have matching subscription.
3532
*/
3633
int modhash_event_mcast (modhash_t *mh, const flux_msg_t *msg);

0 commit comments

Comments
 (0)