lkml.org 
[lkml]   [2010]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] partitions: fix build error in ibm partition detection code
Date
Heiko Carstens <heiko.carstens@de.ibm.com> writes:

> - strlcat(tmp, sizeof(tmp), "(nonl)", PAGE_SIZE);
> + snprintf(tmp, sizeof(tmp), "(nonl)");
> + strlcat(state->pp_buf, tmp, PAGE_SIZE);

What's the point of tmp and snprintf if it just creates a copy of a
constant string?

strlcat(state->pp_buf, "(nonl)", PAGE_SIZE);

Andreas.

--
Andreas Schwab, schwab@redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E
"And now for something completely different."


\
 
 \ /
  Last update: 2010-08-12 10:57    [W:0.029 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site