Re: bug in sanei_debug.h

From: Petter Reinholdtsen (pere@hungry.com)
Date: Sun Oct 22 2000 - 08:54:26 PDT

  • Next message: Petter Reinholdtsen: "Re: make dll.c robust against it being listed in its configuration file..."

    [Jochen Eisinger]
    > + msg = (char *)malloc (sizeof(char) * (strlen(be) + strlen(fmt) + 4));
    > + if (msg == NULL)
    > + {
    > + vsyslog (LOG_DEBUG, fmt, ap);
    > + }

    Eh, don't you think a failing malloc() should be logged as well? I
    guess out of memory problems will give lots of errors elsewhere in the
    code, and it would be nice for the person trying to find the problem
    to know what is happending. I suggest logging a message like
    '[sanei_debug] malloc() failed' when this happending, in addition to
    the message itself.

    Other then this, I liked the suggested change. Go ahead and commit
    it. :-)

    Is this the last GCC extention used in the code? I hope so. :-)

    -- 
    ##>  Petter Reinholdtsen  <##  |  pere@td.org.uit.no
    

    -- Source code, list archive, and docs: http://www.mostang.com/sane/ To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com



    This archive was generated by hypermail 2b29 : Sun Oct 22 2000 - 08:41:24 PDT