Never assign a string constant to a non-const char *.
svn:r495
#endif /* _EVENT_DEFINED_TQENTRY */
struct eventop {
- char *name;
+ const char *name;
void *(*init)(struct event_base *);
int (*add)(void *, struct event *);
int (*del)(void *, struct event *);
{
static char host[1024];
static char file[1024];
- char *p, *p2;
+ char *p;
+ const char *p2;
int len;
u_short port;
void
evhttp_send_error(struct evhttp_request *req, int error, const char *reason)
{
- char *fmt = "<HTML><HEAD>\n"
+ const char *fmt = "<HTML><HEAD>\n"
"<TITLE>%d %s</TITLE>\n"
"</HEAD><BODY>\n"
"<H1>Method Not Implemented</H1>\n"
return;
} else {
/* We need to send a 404 here */
- char *fmt = "<html><head>"
+ const char *fmt = "<html><head>"
"<title>404 Not Found</title>"
"</head><body>"
"<h1>Not Found</h1>"