From 1f40ea64f0286582cbe3644e6f02f08dfebbd20d Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Sun, 30 Aug 2009 22:21:14 -0500 Subject: [PATCH] io.sockets.unix: cleanup two usages of 'rot' and use struct setter instead of memcpy --- basis/io/sockets/unix/unix.factor | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/basis/io/sockets/unix/unix.factor b/basis/io/sockets/unix/unix.factor index ec8b4206e3..9803ec8e69 100644 --- a/basis/io/sockets/unix/unix.factor +++ b/basis/io/sockets/unix/unix.factor @@ -61,8 +61,8 @@ M: object ((client)) ( addrspec -- fd ) : server-socket-fd ( addrspec type -- fd ) [ dup protocol-family ] dip socket-fd - dup init-server-socket - dup handle-fd rot make-sockaddr/size bind io-error ; + [ init-server-socket ] keep + [ handle-fd swap make-sockaddr/size bind io-error ] keep ; M: object (server) ( addrspec -- handle ) [ @@ -148,7 +148,7 @@ M: local make-sockaddr dup length 1 + max-un-path > [ "Path too long" throw ] when "sockaddr-un" AF_UNIX over set-sockaddr-un-family - dup sockaddr-un-path rot utf8 string>alien dup length memcpy ; + [ [ utf8 string>alien ] dip set-sockaddr-un-path ] keep ; M: local parse-sockaddr drop