This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: thread-safty of sprintf
- From: Robert Brusa <bob dot brusa at gmail dot com>
- To: Bob dot Brusa at gmail dot com, MailingList:ecos-discuss <ecos-discuss at ecos dot sourceware dot org>;
- Date: Fri, 19 Jun 2009 12:05:09 +0200
- Subject: Re: [ECOS]thread-safty of sprintf
- References: <op.uvrkcmu3keg3uf@localhost>
- Reply-to: Bob dot Brusa at gmail dot com
On Fri, 19 Jun 2009 10:54:12 +0200, Robert Brusa <Bob.Brusa@gmail.com>
wrote:
Hi
I use sprintf and see effects I do not understand. Quite often, the
string returned from sprintf is "contaminated" in that it starts with an
extra character - always a coma [,]. The rest of the string seems to be
ok.
It does not help when I put a zero-character in string[0] prior to
calling sprintf(string,....
Thread-safty could be an issue, because sprintf is used by user threads
as well - but always with a string local to the calling routine.
What does this extra coma try to tell me? Thanks for help.
Robert
Well, its solved and is has nothing to do with thread safty nor with
sprintf.
One of the many sprintf statement (errenously) included the format
"....\n," and this extra coma pretended to be the first of the current
line. Sorry for disturbing you with a non-issue.
Robert
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss