Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8940c0a0 authored by Elliott Hughes's avatar Elliott Hughes Committed by Android Git Automerger
Browse files

am 97373bbc: am 7cd15614: Merge "system/core 64-bit cleanup."

* commit '97373bbc':
  system/core 64-bit cleanup.
parents bdea585e 97373bbc
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -86,7 +86,7 @@ void restart_tcp_service(int fd, void *cookie)
{
    char buf[100];
    char value[PROPERTY_VALUE_MAX];
    int port = (int)cookie;
    int port = (int) (uintptr_t) cookie;

    if (port <= 0) {
        snprintf(buf, sizeof(buf), "invalid port\n");
@@ -269,7 +269,7 @@ static int create_subprocess(const char *cmd, const char *arg0, const char *arg1
#if !ADB_HOST
static void subproc_waiter_service(int fd, void *cookie)
{
    pid_t pid = (pid_t)cookie;
    pid_t pid = (pid_t) (uintptr_t) cookie;

    D("entered. fd=%d of pid=%d\n", fd, pid);
    for (;;) {
@@ -314,7 +314,7 @@ static int create_subproc_thread(const char *name)
    sti = malloc(sizeof(stinfo));
    if(sti == 0) fatal("cannot allocate stinfo");
    sti->func = subproc_waiter_service;
    sti->cookie = (void*)pid;
    sti->cookie = (void*) (uintptr_t) pid;
    sti->fd = ret_fd;

    if(adb_thread_create( &t, service_bootstrap_func, sti)){
@@ -397,7 +397,7 @@ int service_to_fd(const char *name)
        if (sscanf(name + 6, "%d", &port) == 0) {
            port = 0;
        }
        ret = create_service_thread(restart_tcp_service, (void *)port);
        ret = create_service_thread(restart_tcp_service, (void *) (uintptr_t) port);
    } else if(!strncmp(name, "usb:", 4)) {
        ret = create_service_thread(restart_usb_service, NULL);
#endif
+1 −1
Original line number Diff line number Diff line
@@ -342,7 +342,7 @@ static void local_socket_event_func(int fd, unsigned ev, void *_s)

        while(avail > 0) {
            r = adb_read(fd, x, avail);
            D("LS(%d): post adb_read(fd=%d,...) r=%d (errno=%d) avail=%d\n", s->id, s->fd, r, r<0?errno:0, avail);
            D("LS(%d): post adb_read(fd=%d,...) r=%d (errno=%d) avail=%zu\n", s->id, s->fd, r, r<0?errno:0, avail);
            if(r > 0) {
                avail -= r;
                x += r;
+3 −3
Original line number Diff line number Diff line
@@ -1142,9 +1142,9 @@ int readx(int fd, void *ptr, size_t len)
    char *p = ptr;
    int r;
#if ADB_TRACE
    int  len0 = len;
    size_t len0 = len;
#endif
    D("readx: fd=%d wanted=%d\n", fd, (int)len);
    D("readx: fd=%d wanted=%zu\n", fd, len);
    while(len > 0) {
        r = adb_read(fd, p, len);
        if(r > 0) {
@@ -1163,7 +1163,7 @@ int readx(int fd, void *ptr, size_t len)
    }

#if ADB_TRACE
    D("readx: fd=%d wanted=%d got=%d\n", fd, len0, len0 - len);
    D("readx: fd=%d wanted=%zu got=%zu\n", fd, len0, len0 - len);
    dump_hex( ptr, len0 );
#endif
    return 0;
+3 −3
Original line number Diff line number Diff line
@@ -159,7 +159,7 @@ static void *server_socket_thread(void * arg)
    int serverfd, fd;
    struct sockaddr addr;
    socklen_t alen;
    int port = (int)arg;
    int port = (int) (uintptr_t) arg;

    D("transport: server_socket_thread() starting\n");
    serverfd = -1;
@@ -241,7 +241,7 @@ static const char _start_req[] = "start";
/* 'ok' reply from the adb QEMUD service. */
static const char _ok_resp[]    = "ok";

    const int port = (int)arg;
    const int port = (int) (uintptr_t) arg;
    int res, fd;
    char tmp[256];
    char con_name[32];
@@ -326,7 +326,7 @@ void local_init(int port)

    D("transport: local %s init\n", HOST ? "client" : "server");

    if(adb_thread_create(&thr, func, (void *)port)) {
    if(adb_thread_create(&thr, func, (void *) (uintptr_t) port)) {
        fatal_errno("cannot create local socket %s thread",
                    HOST ? "client" : "server");
    }
+1 −1
Original line number Diff line number Diff line
@@ -179,7 +179,7 @@ static void find_usb_device(const char *base,

                // should have device and configuration descriptors, and atleast two endpoints
            if (desclength < USB_DT_DEVICE_SIZE + USB_DT_CONFIG_SIZE) {
                D("desclength %d is too small\n", desclength);
                D("desclength %zu is too small\n", desclength);
                adb_close(fd);
                continue;
            }
Loading