- peer = malloc(ps);
- if ((new = accept(fd, peer, &ps)) != -1) {
- JS_SetPropertyStr(ctx, argv[1], "protocol", JS_NewInt32(ctx, peer->sa_family));
- if ( peer->sa_family != AF_UNIX ) {
- getnameinfo(peer, ps, host, 40, port, 6, NI_NUMERICHOST | NI_NUMERICSERV);
+ if ((new = accept(fd, &peer, &ps)) != -1) {
+ JS_SetPropertyStr(ctx, argv[1], "protocol", JS_NewInt32(ctx, peer.sa_family));
+ if ( peer.sa_family != AF_UNIX ) {
+ getnameinfo(&peer, ps, host, 40, port, 6, NI_NUMERICHOST | NI_NUMERICSERV);