replace references to __FUNCTION__ with __func__

svn:r40
This commit is contained in:
Niels Provos 2003-03-01 20:31:28 +00:00
parent 3c2916aa13
commit e72dff13d9
4 changed files with 17 additions and 20 deletions

10
event.c
View File

@ -207,7 +207,7 @@ event_loop(int flags)
struct timeval off;
LOG_DBG((LOG_MIST, 10,
"%s: time is running backwards, corrected",
__FUNCTION__));
__func__));
timersub(&event_tv, &tv, &off);
timeout_correct(&off);
@ -464,7 +464,7 @@ void
event_queue_remove(struct event *ev, int queue)
{
if (!(ev->ev_flags & queue))
errx(1, "%s: %p(fd %d) not on queue %x", __FUNCTION__,
errx(1, "%s: %p(fd %d) not on queue %x", __func__,
ev, ev->ev_fd, queue);
ev->ev_flags &= ~queue;
@ -482,7 +482,7 @@ event_queue_remove(struct event *ev, int queue)
TAILQ_REMOVE(&eventqueue, ev, ev_next);
break;
default:
errx(1, "%s: unknown queue %x", __FUNCTION__, queue);
errx(1, "%s: unknown queue %x", __func__, queue);
}
}
@ -490,7 +490,7 @@ void
event_queue_insert(struct event *ev, int queue)
{
if (ev->ev_flags & queue)
errx(1, "%s: %p(fd %d) already on queue %x", __FUNCTION__,
errx(1, "%s: %p(fd %d) already on queue %x", __func__,
ev, ev->ev_fd, queue);
ev->ev_flags |= queue;
@ -508,6 +508,6 @@ event_queue_insert(struct event *ev, int queue)
TAILQ_INSERT_TAIL(&eventqueue, ev, ev_next);
break;
default:
errx(1, "%s: unknown queue %x", __FUNCTION__, queue);
errx(1, "%s: unknown queue %x", __func__, queue);
}
}

View File

@ -47,12 +47,13 @@
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <err.h>
#ifdef USE_LOG
#include "log.h"
#else
#define LOG_DBG(x)
#define log_error(x) perror(x)
#define log_error warn
#endif
#include "event.h"
@ -142,7 +143,7 @@ kq_insert(struct kqop *kqop, struct kevent *kev)
newchange = realloc(kqop->changes,
nevents * sizeof(struct kevent));
if (newchange == NULL) {
log_error(__FUNCTION__": malloc");
log_error("%s: malloc", __func__);
return (-1);
}
kqop->changes = newchange;
@ -155,7 +156,7 @@ kq_insert(struct kqop *kqop, struct kevent *kev)
* the next realloc will pick it up.
*/
if (newresult == NULL) {
log_error(__FUNCTION__": malloc");
log_error("%s: malloc", __func__);
return (-1);
}
kqop->events = newchange;
@ -165,8 +166,8 @@ kq_insert(struct kqop *kqop, struct kevent *kev)
memcpy(&kqop->changes[kqop->nchanges++], kev, sizeof(struct kevent));
LOG_DBG((LOG_MISC, 70, __FUNCTION__": fd %d %s%s",
kev->ident,
LOG_DBG((LOG_MISC, 70, "%s: fd %d %s%s",
__func__, kev->ident,
kev->filter == EVFILT_READ ? "EVFILT_READ" : "EVFILT_WRITE",
kev->flags == EV_DELETE ? " (del)" : ""));
@ -203,7 +204,7 @@ kq_dispatch(void *arg, struct timeval *tv)
return (0);
}
LOG_DBG((LOG_MISC, 80, __FUNCTION__": kevent reports %d", res));
LOG_DBG((LOG_MISC, 80, "%s: kevent reports %d", __func__, res));
for (i = 0; i < res; i++) {
int which = 0;
@ -225,7 +226,7 @@ kq_dispatch(void *arg, struct timeval *tv)
return (-1);
}
ev = events[i].udata;
ev = (struct event *)events[i].udata;
if (events[i].filter == EVFILT_READ) {
which |= EV_READ;
@ -250,7 +251,7 @@ kq_dispatch(void *arg, struct timeval *tv)
if (events[i].flags & EV_ERROR || events[i].filter == NULL)
continue;
ev = events[i].udata;
ev = (struct event *)events[i].udata;
if (ev->ev_events & EV_PERSIST)
continue;

7
poll.c
View File

@ -122,7 +122,7 @@ int
poll_dispatch(void *arg, struct timeval *tv)
{
int res, i, count, sec, nfds;
struct event *ev, *next;
struct event *ev;
struct pollop *pop = arg;
count = pop->event_count;
@ -192,8 +192,7 @@ poll_dispatch(void *arg, struct timeval *tv)
} else if (evsignal_caught)
evsignal_process();
LOG_DBG((LOG_MISC, 80, __FUNCTION__": poll reports %d",
res));
LOG_DBG((LOG_MISC, 80, "%s: poll reports %d", __func__, res));
if (res == 0)
return (0);
@ -240,8 +239,6 @@ poll_del(void *arg, struct event *ev)
{
struct pollop *pop = arg;
int signal;
if (!(ev->ev_events & EV_SIGNAL))
return (0);

View File

@ -194,8 +194,7 @@ select_dispatch(void *arg, struct timeval *tv)
} else if (evsignal_caught)
evsignal_process();
LOG_DBG((LOG_MISC, 80, __FUNCTION__": select reports %d",
res));
LOG_DBG((LOG_MISC, 80, "%s: select reports %d", __func__, res));
maxfd = 0;
for (ev = TAILQ_FIRST(&eventqueue); ev != NULL; ev = next) {