This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: thread-safty of sprintf


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]