From 49eb95319e878832cb3d6aa51a63d08d6b1b36b7 Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Mon, 4 Mar 2019 17:07:23 +0100 Subject: [socket] Make use of official monitor to term function Remove own function to make monitor printable (was a hack) and make use of the new enif_make_monitor_term instead. --- erts/emulator/nifs/common/socket_nif.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'erts/emulator/nifs/common/socket_nif.c') diff --git a/erts/emulator/nifs/common/socket_nif.c b/erts/emulator/nifs/common/socket_nif.c index cd51a5fcbd..2d8dc3c201 100644 --- a/erts/emulator/nifs/common/socket_nif.c +++ b/erts/emulator/nifs/common/socket_nif.c @@ -32,7 +32,7 @@ * * esock_dbg_printf("DEMONP", "[%d] %s: %T\r\n", * descP->sock, slogan, - * my_make_monitor_term(env, &monP->mon)); + * MON2T(env, &monP->mon)); * */ @@ -17309,12 +17309,6 @@ void cnt_dec(Uint32* cnt, Uint32 dec) #if !defined(__WIN32__) -static -ERL_NIF_TERM my_make_monitor_term(ErlNifEnv* env, const ErlNifMonitor* mon) -{ - return ((ERL_NIF_TERM)&mon->data) + 2; -} - static int esock_monitor(const char* slogan, ErlNifEnv* env, @@ -17858,7 +17852,7 @@ void socket_down(ErlNifEnv* env, "\r\n Descriptor: %d" "\r\n Monitor: %T" "\r\n", sres, pid, descP->sock, - my_make_monitor_term(env, mon)); + MON2T(env, mon)); } } else { -- cgit v1.2.3