diff options
| author | Jean-Baptiste Queru <jbq@google.com> | 2010-06-15 09:24:23 -0700 |
|---|---|---|
| committer | Android Code Review <code-review@android.com> | 2010-06-15 09:24:23 -0700 |
| commit | 1dbfce3dfc66046402ccbd1e83928942f824294d (patch) | |
| tree | 61443d1a0250f75d1952c1392d3cf801169f4b59 | |
| parent | 62f4d86b7c9143860bc5e9679382fcf159b788b4 (diff) | |
| parent | c419e2a210ad7e37a1f749f2ab4de7c7f95b90d7 (diff) | |
| download | system_core-1dbfce3dfc66046402ccbd1e83928942f824294d.tar.gz system_core-1dbfce3dfc66046402ccbd1e83928942f824294d.tar.bz2 system_core-1dbfce3dfc66046402ccbd1e83928942f824294d.zip | |
Merge "adb: clean up 0 --> NULL for pointers"
| -rw-r--r-- | adb/sockets.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/adb/sockets.c b/adb/sockets.c index 9f1b5987..58dcfbbd 100644 --- a/adb/sockets.c +++ b/adb/sockets.c @@ -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; |
