merge from open-source master

Change-Id: Ia8d41f96f3885bd7159571182d09c1da079e5bc9
This commit is contained in:
The Android Open Source Project 2010-06-15 11:24:47 -07:00
commit 07a804b83a
1 changed files with 3 additions and 3 deletions

View File

@ -366,7 +366,7 @@ static void local_socket_event_func(int fd, unsigned ev, void *_s)
asocket *create_local_socket(int fd)
{
asocket *s = calloc(1, sizeof(asocket));
if(s == 0) fatal("cannot allocate socket");
if (s == NULL) fatal("cannot allocate socket");
install_local_socket(s);
s->fd = fd;
s->enqueue = local_socket_enqueue;
@ -482,7 +482,7 @@ asocket *create_remote_socket(unsigned id, atransport *t)
asocket *s = calloc(1, sizeof(aremotesocket));
adisconnect* dis = &((aremotesocket*)s)->disconnect;
if(s == 0) fatal("cannot allocate socket");
if (s == NULL) fatal("cannot allocate socket");
s->id = id;
s->enqueue = remote_socket_enqueue;
s->ready = remote_socket_ready;
@ -761,7 +761,7 @@ asocket *create_smart_socket(void (*action_cb)(asocket *s, const char *act))
{
D("Creating smart socket \n");
asocket *s = calloc(1, sizeof(asocket));
if(s == 0) fatal("cannot allocate socket");
if (s == NULL) fatal("cannot allocate socket");
s->id = 0;
s->enqueue = smart_socket_enqueue;
s->ready = smart_socket_ready;