From 14461734c427bae058f4944368b8d7f641b15695 Mon Sep 17 00:00:00 2001 From: Kevin Rosenberg Date: Sat, 17 Jan 2009 20:48:39 -0700 Subject: [PATCH] fix style warning --- color.lisp | 20 ++++++++------------ sockets.lisp | 1 + 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/color.lisp b/color.lisp index b18bd2d..52d5b46 100644 --- a/color.lisp +++ b/color.lisp @@ -143,14 +143,10 @@ (setq s (/ delta max))) (when (plusp delta) - (setq h (cond - ((= max r) - (nth-value 0 (/ (- g b) delta))) - ((= max g) - (nth-value 0 (+ 2 (/ (- b r) delta)))) - (t - (nth-value 0 (+ 4 (/ (- r g) delta)))))) - (setq h (the fixnum (* 60 h))) + (setq h (* 60 (cond + ((= max r) (/ (- g b) delta)) + ((= max g) (+ 2 (/ (- b r) delta))) + (t (+ 4 (/ (- r g) delta)))))) (when (minusp h) (incf h 360))) @@ -171,18 +167,18 @@ (type (or null fixnum) h)) (when (plusp max) - (setq s (truncate (the fixnum (* 255 delta)) max))) + (setq s (round (the fixnum (* 255 delta)) max))) (when (plusp delta) (setq h (cond ((= max r) - (truncate (the fixnum (* 60 (the fixnum (- g b)))) delta)) + (round (the fixnum (* 60 (the fixnum (- g b)))) delta)) ((= max g) (the fixnum - (+ 120 (truncate (the fixnum (* 60 (the fixnum (- b r)))) delta)))) + (+ 120 (round (the fixnum (* 60 (the fixnum (- b r)))) delta)))) (t (the fixnum - (+ 240 (truncate (the fixnum (* 60 (the fixnum (- r g)))) delta)))))) + (+ 240 (round (the fixnum (* 60 (the fixnum (- r g)))) delta)))))) (when (minusp h) (incf h 360))) diff --git a/sockets.lisp b/sockets.lisp index dc8965c..c8c9b58 100644 --- a/sockets.lisp +++ b/sockets.lisp @@ -22,6 +22,7 @@ (defun listen-to-inet-port (&key (port 0) (kind :stream) (reuse nil)) "Create, bind and listen to an inet socket on *:PORT. setsockopt SO_REUSEADDR if :reuse is not nil" + (declare (ignore kind)) (let ((socket (make-instance 'sb-bsd-sockets:inet-socket :type :stream :protocol :tcp))) -- 2.34.1