svn commit: r233700 - head/sys/kern
Dimitry Andric
dim at FreeBSD.org
Tue Apr 17 20:24:43 UTC 2012
On 2012-04-02 13:52, John Baldwin wrote:
...
>> It seems the for loop walks the list until the end, then tacks 'sc' onto
>> it.
>>
>> So to 'fix' the warning, and make the meaning more explicit, we should
>> probably rewrite that fragment as:
>>
>> LIST_INIT(&(sc->ha_ccb));
>> /* Link us into the HA list */
>> for (ha =&Asr_softc_list; *ha; ha =&((*ha)->ha_next))
>> ;
>> *(ha) = sc;
>>
>> Is this OK?
>
> Can we just make that code use a STAILQ() instead of doing it obscurely by
> hand?
That would be a more invasive change, and since this driver is
essentially unmaintained, I'd like to change as little as possible. :)
Another solution is to just silence the warning for this driver.
More information about the svn-src-head
mailing list