Make privilegeset_privs more const
This commit is contained in:
parent
9962f62577
commit
181410f218
4 changed files with 5 additions and 5 deletions
|
@ -68,7 +68,7 @@ struct privset_diff {
|
|||
};
|
||||
|
||||
bool privilegeset_in_set(const struct PrivilegeSet *set, const char *priv);
|
||||
const char **privilegeset_privs(const struct PrivilegeSet *set);
|
||||
const char *const *privilegeset_privs(const struct PrivilegeSet *set);
|
||||
struct PrivilegeSet *privilegeset_set_new(const char *name, const char *privs, PrivilegeFlags flags);
|
||||
struct PrivilegeSet *privilegeset_extend(const struct PrivilegeSet *parent, const char *name, const char *privs, PrivilegeFlags flags);
|
||||
struct PrivilegeSet *privilegeset_get(const char *name);
|
||||
|
|
|
@ -233,7 +233,7 @@ privilegeset_in_set(const struct PrivilegeSet *set, const char *priv)
|
|||
return found != NULL;
|
||||
}
|
||||
|
||||
const char **
|
||||
const char *const *
|
||||
privilegeset_privs(const struct PrivilegeSet *set)
|
||||
{
|
||||
static const char *no_privs[] = { NULL };
|
||||
|
@ -451,7 +451,7 @@ privilegeset_report(struct Client *source_p)
|
|||
set->name);
|
||||
send_multiline_remote_pad(source_p, &me);
|
||||
send_multiline_remote_pad(source_p, source_p);
|
||||
for (const char **s = privilegeset_privs(set); *s != NULL; s++)
|
||||
for (const char *const *s = privilegeset_privs(set); *s != NULL; s++)
|
||||
send_multiline_item(source_p, "%s", *s);
|
||||
send_multiline_fini(source_p, NULL);
|
||||
}
|
||||
|
|
|
@ -1492,7 +1492,7 @@ oper_up(struct Client *source_p, struct oper_conf *oper_p)
|
|||
sendto_one(source_p, form_str(RPL_YOUREOPER), me.name, source_p->name);
|
||||
sendto_one_notice(source_p, ":*** Oper privilege set is %s", oper_p->privset->name);
|
||||
send_multiline_init(source_p, " ", ":%s NOTICE %s :*** Oper privs are ", me.name, source_p->name);
|
||||
for (const char **s = privilegeset_privs(oper_p->privset); *s != NULL; s++)
|
||||
for (const char *const *s = privilegeset_privs(oper_p->privset); *s != NULL; s++)
|
||||
send_multiline_item(source_p, "%s", *s);
|
||||
send_multiline_fini(source_p, NULL);
|
||||
send_oper_motd(source_p);
|
||||
|
|
|
@ -95,7 +95,7 @@ static void show_privs(struct Client *source_p, struct Client *target_p)
|
|||
send_multiline_remote_pad(source_p, source_p);
|
||||
|
||||
if (target_p->user->privset)
|
||||
for (const char **s = privilegeset_privs(target_p->user->privset); *s != NULL; s++)
|
||||
for (const char *const *s = privilegeset_privs(target_p->user->privset); *s != NULL; s++)
|
||||
send_multiline_item(source_p, "%s", *s);
|
||||
|
||||
if (IsOper(target_p))
|
||||
|
|
Loading…
Reference in a new issue