From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keith Owens Date: Thu, 29 May 2003 01:37:52 +0000 Subject: Re: [Linux-ia64] SAL error record logging/decoding Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-ia64@vger.kernel.org On Wed, 28 May 2003 19:34:01 -0600, Bjorn Helgaas 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" :)