Commit 61e8ab91 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Various polishing

parent 176190e6
...@@ -322,7 +322,7 @@ VRT_r_beresp_storage(struct sess *sp) ...@@ -322,7 +322,7 @@ VRT_r_beresp_storage(struct sess *sp)
return (NULL); return (NULL);
} }
void void __match_proto__()
VRT_l_beresp_storage(struct sess *sp, const char *str, ...) VRT_l_beresp_storage(struct sess *sp, const char *str, ...)
{ {
va_list ap; va_list ap;
......
...@@ -81,8 +81,8 @@ int mgt_vcc_default(const char *bflag, const char *f_arg, char *vcl, int Cflag); ...@@ -81,8 +81,8 @@ int mgt_vcc_default(const char *bflag, const char *f_arg, char *vcl, int Cflag);
int mgt_push_vcls_and_start(unsigned *status, char **p); int mgt_push_vcls_and_start(unsigned *status, char **p);
int mgt_has_vcl(void); int mgt_has_vcl(void);
extern char *mgt_cc_cmd; extern char *mgt_cc_cmd;
extern char *mgt_vcl_dir; extern const char *mgt_vcl_dir;
extern char *mgt_vmod_dir; extern const char *mgt_vmod_dir;
extern unsigned mgt_vcc_err_unref; extern unsigned mgt_vcc_err_unref;
#define REPORT0(pri, fmt) \ #define REPORT0(pri, fmt) \
......
...@@ -67,8 +67,8 @@ struct vclprog { ...@@ -67,8 +67,8 @@ struct vclprog {
static VTAILQ_HEAD(, vclprog) vclhead = VTAILQ_HEAD_INITIALIZER(vclhead); static VTAILQ_HEAD(, vclprog) vclhead = VTAILQ_HEAD_INITIALIZER(vclhead);
char *mgt_cc_cmd; char *mgt_cc_cmd;
char *mgt_vcl_dir; const char *mgt_vcl_dir;
char *mgt_vmod_dir; const char *mgt_vmod_dir;
unsigned mgt_vcc_err_unref; unsigned mgt_vcc_err_unref;
static struct vcc *vcc; static struct vcc *vcc;
......
...@@ -645,7 +645,7 @@ main(int argc, char * const *argv) ...@@ -645,7 +645,7 @@ main(int argc, char * const *argv)
if (T_arg != NULL) if (T_arg != NULL)
mgt_cli_telnet(T_arg); mgt_cli_telnet(T_arg);
VSM_Alloc(0, VSM_CLASS_MARK, "", ""); AN(VSM_Alloc(0, VSM_CLASS_MARK, "", ""));
MGT_Run(); MGT_Run();
......
...@@ -63,7 +63,7 @@ void binheap_insert(struct binheap *, void *); ...@@ -63,7 +63,7 @@ void binheap_insert(struct binheap *, void *);
* Insert an item * Insert an item
*/ */
void binheap_reorder(struct binheap *, unsigned idx); void binheap_reorder(const struct binheap *, unsigned idx);
/* /*
* Move an order after changing its key value. * Move an order after changing its key value.
*/ */
......
...@@ -379,7 +379,7 @@ binheap_delete(struct binheap *bh, unsigned idx) ...@@ -379,7 +379,7 @@ binheap_delete(struct binheap *bh, unsigned idx)
*/ */
void void
binheap_reorder(struct binheap *bh, unsigned idx) binheap_reorder(const struct binheap *bh, unsigned idx)
{ {
assert(bh != NULL); assert(bh != NULL);
......
...@@ -230,7 +230,7 @@ dumps(pstruct + "} Vmod_Func_" + modname + ";\n") ...@@ -230,7 +230,7 @@ dumps(pstruct + "} Vmod_Func_" + modname + ";\n")
fc.write('\t;\n') fc.write('\t;\n')
fc.write("\n"); fc.write("\n");
fc.write('const char *Vmod_Spec[] = {\n' + slist + '\t0\n};\n') fc.write('const char * const Vmod_Spec[] = {\n' + slist + '\t0\n};\n')
fc.write("\n") fc.write("\n")
...@@ -36,14 +36,14 @@ ...@@ -36,14 +36,14 @@
#include "vcc_if.h" #include "vcc_if.h"
void void __match_proto__()
vmod_set_ip_tos(struct sess *sp, int tos) vmod_set_ip_tos(struct sess *sp, int tos)
{ {
TCP_Assert(setsockopt(sp->fd, IPPROTO_IP, IP_TOS, &tos, sizeof(tos))); TCP_Assert(setsockopt(sp->fd, IPPROTO_IP, IP_TOS, &tos, sizeof(tos)));
} }
static const char * static const char * __match_proto__()
vmod_updown(struct sess *sp, int up, const char *s, va_list ap) vmod_updown(struct sess *sp, int up, const char *s, va_list ap)
{ {
unsigned u; unsigned u;
...@@ -79,7 +79,7 @@ vmod_updown(struct sess *sp, int up, const char *s, va_list ap) ...@@ -79,7 +79,7 @@ vmod_updown(struct sess *sp, int up, const char *s, va_list ap)
} }
} }
const char * const char * __match_proto__()
vmod_toupper(struct sess *sp, struct vmod_priv *priv, const char *s, ...) vmod_toupper(struct sess *sp, struct vmod_priv *priv, const char *s, ...)
{ {
const char *p; const char *p;
...@@ -98,7 +98,7 @@ vmod_toupper(struct sess *sp, struct vmod_priv *priv, const char *s, ...) ...@@ -98,7 +98,7 @@ vmod_toupper(struct sess *sp, struct vmod_priv *priv, const char *s, ...)
return (p); return (p);
} }
const char * const char * __match_proto__()
vmod_tolower(struct sess *sp, struct vmod_priv *priv, const char *s, ...) vmod_tolower(struct sess *sp, struct vmod_priv *priv, const char *s, ...)
{ {
const char *p; const char *p;
...@@ -135,7 +135,7 @@ vmod_random(struct sess *sp, double lo, double hi) ...@@ -135,7 +135,7 @@ vmod_random(struct sess *sp, double lo, double hi)
return (a); return (a);
} }
void void __match_proto__()
vmod_log(struct sess *sp, const char *fmt, ...) vmod_log(struct sess *sp, const char *fmt, ...)
{ {
char buf[8192], *p; char buf[8192], *p;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment