mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
r16507@catbus: nickm | 2007-11-07 01:34:55 -0500
Never assign a string constant to a non-const char *. svn:r495
This commit is contained in:
parent
a3f122d667
commit
7feba57010
2
event.h
2
event.h
@ -251,7 +251,7 @@ TAILQ_HEAD (evkeyvalq, evkeyval);
|
||||
#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 *);
|
||||
|
7
http.c
7
http.c
@ -438,7 +438,8 @@ evhttp_hostportfile(char *url, char **phost, u_short *pport, char **pfile)
|
||||
{
|
||||
static char host[1024];
|
||||
static char file[1024];
|
||||
char *p, *p2;
|
||||
char *p;
|
||||
const char *p2;
|
||||
int len;
|
||||
u_short port;
|
||||
|
||||
@ -1617,7 +1618,7 @@ evhttp_send_done(struct evhttp_connection *evcon, void *arg)
|
||||
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"
|
||||
@ -1915,7 +1916,7 @@ evhttp_handle_request(struct evhttp_request *req, void *arg)
|
||||
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>"
|
||||
|
Loading…
x
Reference in New Issue
Block a user