lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [task #6933] Review usage of ASSERT and error handling with


From: Kieran Mansley
Subject: [lwip-devel] [task #6933] Review usage of ASSERT and error handling with LWIP_NOASSERT
Date: Tue, 12 Jun 2007 15:41:53 +0000
User-agent: Opera/9.21 (X11; Linux i686; U; en)

Follow-up Comment #6, task #6933 (project lwip):

Just to make sure I understand what your suggesting Frederic, which bit of
the following example do you think shouldn't be there?

  if (conn == NULL) {
    LWIP_ASSERT("some error message", (conn != NULL));
    return ERR_ARG;
  }

In production code it will just become:
  if (conn == NULL)
    return ERR_ARG;

In debug code it will be effectively just:
  LWIP_ASSERT("some error message", (conn != NULL));

I think you're saying we should just get rid of it altogether as no one
should be calling with conn == NULL.  However, while that's true, this will
make sure they're not, while making sure production code is more reliable in
the event of something really strange happening.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/task/?6933>

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





reply via email to

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