From: Matthew W. <wi...@de...> - 2003-06-23 13:18:18
|
On Mon, Jun 23, 2003 at 03:14:35PM +0200, Wolfram Gloger wrote: > > Wy open-code the loop rather than: > > > > - memset(mp_bus_id_to_pci_bus, -1, max_mp_busses); > > + memset(mp_bus_id_to_pci_bus, -1, max_mp_busses * sizeof(int)); > > Please check the memset() specs. memset() sets _bytes_ not ints. > However, mp_bus_id_to_pci_bus[..] is compared to the integer -1 in > other parts of the kernel. this is Linux, not software engineering 101. 0xffffffff is the bitpattern for (int) -1 on all Linux platforms. And this is even in i386-specific code. -- "It's not Hollywood. War is real, war is primarily not about defeat or victory, it is about death. I've seen thousands and thousands of dead bodies. Do you think I want to have an academic debate on this subject?" -- Robert Fisk |