On Wed, 28 May 2003 19:34:01 -0600, Bjorn Helgaas <bjorn_helgaas@hp.com> wrote: >On Wednesday 28 May 2003 6:07 pm, Keith Owens wrote: >> >+#define CPUSTR "cpu%d" >> >+ char name[sizeof(CPUSTR)]; >> >> Too small. name[] will overflow at cpu 100. > >Thanks. I remember thinking about that when I copied the code, >but forgot to fix it. How about something like this: >+ char cpustr[sizeof(CPUSTR) + 2]; That will do until we go past cpu 9,999. "10,000 cpus should be enough for anybody" :)Received on Wed May 28 18:38:57 2003
This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:15 EST