[En-Nut-Discussion] SVN compilation fix: lanc111.c

Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Mon Oct 5 19:18:00 CEST 2009


>>>>> "Thiago" == Thiago A Corrêa <thiago.correa at gmail.com> writes:

    Thiago> Hi, On Mon, Oct 5, 2009 at 1:34 PM, Uwe Bonnes
    Thiago> <bon at elektron.ikp.physik.tu-darmstadt.de> wrote:
    >> -        if (*((uint32_t *) (ifn->if_mac)) && *((uint32_t *)
    >> (ifn->if_mac)) != 0xFFFFFFFFUL) { +      uint32_t test_NULL = 0UL; +
    >>      uint32_t test_MAX = 0xFFFFFFFFUL; + +      if
    >> ((memcmp(ifn->if_mac, &test_NULL, 4)) && (memcmp(ifn->if_mac,
    >> &test_MAX, 4))) {             break;


    Thiago> This was quite valid code. A bit ugly, maybe, but it wouldn't
    Thiago> reserve memory just for the sake of knowing if mac address is
    Thiago> different than 0 or all bits 1. Perhaps we are using more strict
    Thiago> compile flags than we should?

The culprit is Werrer in Makedefs.

-- 
Uwe Bonnes                bon at elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------



More information about the En-Nut-Discussion mailing list