diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2005-11-02 15:34:44 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2005-11-02 15:34:44 +0000 |
commit | e84c8ef494253da47889c7fee137e7f3fbf23211 (patch) | |
tree | 32f8d517d6f4da4a91d775552758419dcdbe9dd6 /usr.sbin | |
parent | 8babe8318ec5d7cd2bdf6efb3218ea6f1f19fcb7 (diff) |
Mark some additional function arguments as const.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/bgpd/bgpd.h | 12 | ||||
-rw-r--r-- | usr.sbin/bgpd/buffer.c | 4 | ||||
-rw-r--r-- | usr.sbin/bgpd/imsg.c | 6 | ||||
-rw-r--r-- | usr.sbin/bgpd/name2id.c | 6 |
4 files changed, 14 insertions, 14 deletions
diff --git a/usr.sbin/bgpd/bgpd.h b/usr.sbin/bgpd/bgpd.h index 5fdf69f66da..e8cd1e3e5a1 100644 --- a/usr.sbin/bgpd/bgpd.h +++ b/usr.sbin/bgpd/bgpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bgpd.h,v 1.180 2005/11/01 10:58:29 claudio Exp $ */ +/* $OpenBSD: bgpd.h,v 1.181 2005/11/02 15:34:43 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -649,7 +649,7 @@ int bgpd_redistribute(int, struct kroute *, struct kroute6 *); /* buffer.c */ struct buf *buf_open(size_t); -int buf_add(struct buf *, void *, size_t); +int buf_add(struct buf *, const void *, size_t); void *buf_reserve(struct buf *, size_t); int buf_close(struct msgbuf *, struct buf *); int buf_write(int, struct buf *); @@ -687,10 +687,10 @@ void imsg_init(struct imsgbuf *, int); int imsg_read(struct imsgbuf *); int imsg_get(struct imsgbuf *, struct imsg *); int imsg_compose(struct imsgbuf *, enum imsg_type, u_int32_t, pid_t, int, - void *, u_int16_t); + const void *, u_int16_t); struct buf *imsg_create(struct imsgbuf *, enum imsg_type, u_int32_t, pid_t, u_int16_t); -int imsg_add(struct buf *, void *, u_int16_t); +int imsg_add(struct buf *, const void *, u_int16_t); int imsg_close(struct imsgbuf *, struct buf *); void imsg_free(struct imsg *); int imsg_get_fd(struct imsgbuf *); @@ -729,11 +729,11 @@ int pftable_addr_remove(struct pftable_msg *); int pftable_commit(void); /* name2id.c */ -u_int16_t rtlabel_name2id(char *); +u_int16_t rtlabel_name2id(const char *); const char *rtlabel_id2name(u_int16_t); void rtlabel_unref(u_int16_t); void rtlabel_ref(u_int16_t); -u_int16_t pftable_name2id(char *); +u_int16_t pftable_name2id(const char *); const char *pftable_id2name(u_int16_t); void pftable_unref(u_int16_t); void pftable_ref(u_int16_t); diff --git a/usr.sbin/bgpd/buffer.c b/usr.sbin/bgpd/buffer.c index f82f04dc0db..000e688a994 100644 --- a/usr.sbin/bgpd/buffer.c +++ b/usr.sbin/bgpd/buffer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: buffer.c,v 1.32 2005/08/11 16:24:11 henning Exp $ */ +/* $OpenBSD: buffer.c,v 1.33 2005/11/02 15:34:43 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -49,7 +49,7 @@ buf_open(size_t len) } int -buf_add(struct buf *buf, void *data, size_t len) +buf_add(struct buf *buf, const void *data, size_t len) { if (buf->wpos + len > buf->size) return (-1); diff --git a/usr.sbin/bgpd/imsg.c b/usr.sbin/bgpd/imsg.c index d631db135eb..a9498d93dd9 100644 --- a/usr.sbin/bgpd/imsg.c +++ b/usr.sbin/bgpd/imsg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: imsg.c,v 1.36 2005/04/26 15:18:22 henning Exp $ */ +/* $OpenBSD: imsg.c,v 1.37 2005/11/02 15:34:43 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -122,7 +122,7 @@ imsg_get(struct imsgbuf *ibuf, struct imsg *imsg) int imsg_compose(struct imsgbuf *ibuf, enum imsg_type type, u_int32_t peerid, - pid_t pid, int fd, void *data, u_int16_t datalen) + pid_t pid, int fd, const void *data, u_int16_t datalen) { struct buf *wbuf; int n; @@ -170,7 +170,7 @@ imsg_create(struct imsgbuf *ibuf, enum imsg_type type, u_int32_t peerid, } int -imsg_add(struct buf *msg, void *data, u_int16_t datalen) +imsg_add(struct buf *msg, const void *data, u_int16_t datalen) { if (datalen) if (buf_add(msg, data, datalen) == -1) { diff --git a/usr.sbin/bgpd/name2id.c b/usr.sbin/bgpd/name2id.c index 8b217a49db2..66f13a062c8 100644 --- a/usr.sbin/bgpd/name2id.c +++ b/usr.sbin/bgpd/name2id.c @@ -1,4 +1,4 @@ -/* $OpenBSD: name2id.c,v 1.4 2005/07/01 09:19:24 claudio Exp $ */ +/* $OpenBSD: name2id.c,v 1.5 2005/11/02 15:34:43 claudio Exp $ */ /* * Copyright (c) 2004, 2005 Henning Brauer <henning@openbsd.org> @@ -48,7 +48,7 @@ struct n2id_labels rt_labels = TAILQ_HEAD_INITIALIZER(rt_labels); struct n2id_labels pftable_labels = TAILQ_HEAD_INITIALIZER(pftable_labels); u_int16_t -rtlabel_name2id(char *name) +rtlabel_name2id(const char *name) { return (_name2id(&rt_labels, name)); } @@ -72,7 +72,7 @@ rtlabel_ref(u_int16_t id) } u_int16_t -pftable_name2id(char *name) +pftable_name2id(const char *name) { return (_name2id(&rt_labels, name)); } |