lkml.org 
[lkml]   [2004]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Doubt
From
Date
Am Mo, den 28.06.2004 um 20:59 Uhr +0200 schrieb Esteve Espuña Sargatal:

> #include <asm/string.h> /* for strcpy */
>
> static char remcomOutBuffer[BUFMAX];
>
> strcpy(remcomOutBuffer, "OK");
>
> Hope it's ok.

Not really. Well, this example here works, but only if you know that you
won't overflow the buffer.

strlcpy(emcomOutBuffer, "OK", BUFMAX);

(replace "OK" with the string you wish to copy)

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 14:04    [W:1.671 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site