r18484@catbus: nickm | 2008-02-28 12:47:20 -0500

Use event_warn() function, not fprintf-to-stderr.


svn:r676
This commit is contained in:
Nick Mathewson 2008-02-28 17:47:30 +00:00
parent 0e7cbe6508
commit d71da6f737

View File

@ -67,6 +67,7 @@
#include "event.h"
#include "config.h"
#include "log.h"
#include "mm-internal.h"
#include "evbuffer-internal.h"
@ -344,7 +345,7 @@ evbuffer_pullup(struct evbuffer *buf, int size)
return chain->buffer + chain->misalign;
if ((tmp = evbuffer_chain_new(size)) == NULL) {
fprintf(stderr, "%s: out of memory\n", __func__);
event_warn("%s: out of memory\n", __func__);
return (NULL);
}
@ -535,7 +536,7 @@ evbuffer_readln(struct evbuffer *buffer, size_t *n_read_out,
}
if ((line = event_malloc(n_to_copy+1)) == NULL) {
fprintf(stderr, "%s: out of memory\n", __func__);
event_warn("%s: out of memory\n", __func__);
evbuffer_drain(buffer, n_to_copy + extra_drain);
return (NULL);
}