lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [patch #5067] Fix err_to_errno() macro for sockets API


From: Dmitry Potapov
Subject: [lwip-devel] [patch #5067] Fix err_to_errno() macro for sockets API
Date: Tue, 06 Mar 2007 09:20:23 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.10) Gecko/20070216 Firefox/1.5.0.10

Follow-up Comment #3, patch #5067 (project lwip):

Accordingly to CVS, the original patch was applyed three weeks ago:
date: 2006-02-13 08:14:11 +0000;  author: christiaans;  state: Exp;  lines:
+5 -2
Patch from Curt McDowell fixes err_to_errno macro.

BTW, I believe that it would be suffient to write:

 ((size_t)(-(err)) < ERR_TO_ERRNO_TABLE_SIZE ? 

because even if err happens to be positive then
((size_t)(-(err)) will be larger than ERR_TO_ERRNO_TABLE_SIZE.
So, one comparision less, and you have smaller footprint.

I used 'size_t' above (not 'u8_t') because ERR_TO_ERRNO_TABLE_SIZE is
'size_t', so when you use `size_t', you have smaller code than with 'u8_t'

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?5067>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]