From: "Eric Polino" <aluink@gmail.com>
Cc: linux-c-programming@vger.kernel.org
Subject: Re: sprintf with mips
Date: Wed, 6 Feb 2008 16:21:48 -0500 [thread overview]
Message-ID: <b21328ed0802061321m276e4634v760cb71909c18a90@mail.gmail.com> (raw)
In-Reply-To: <20080206191600.243670@gmx.net>
On Feb 6, 2008 2:16 PM, Christian Stalp <christian.stalp@gmx.de> wrote:
> Hello out there,
> are there any known problems with sprintf under mips? I spend some time to make this code runnable:
>
> sprintf(insertvalues, " %d , ' %s ' , %d ", counter, "192.168.1.1", mytraffic->num_frames);
> printf("input-string: %s\n", insertvalues);
>
I don't know if this really matters...but why are you doing this this
way? Why not just do it in one line with
printf("input-string: %d , ' %s ' , %d \n", counter, "192.168.1.1",
mytraffic->num_frames);
Cheers,
Eric
> This works properly under x86 but if I run this under mips, the string is empty! Even if the variable 'counter' is uninitialized or 'mytraffic->num_frames' (which is not the case, I can see the values if I dump them directly with printf) there should be at least that IP-address-string which should be inserted! This is weired. Has anybody an idea what the problem is here?
>
> Thank you.
>
> Gruss Christian
>
>
> --
> GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
> Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail
> -
> To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
"None are more hopelessly enslaved than those who falsely believe they
are free."
--Goethe
"Freedom is living without government coercion."
--Ron Paul (www.ronpaul2008.com)
next prev parent reply other threads:[~2008-02-06 21:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-06 19:16 sprintf with mips Christian Stalp
2008-02-06 19:45 ` Manning, Gary L
2008-02-06 21:21 ` Eric Polino [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-02-06 19:58 Christian Stalp
2008-02-06 20:14 Christian Stalp
2008-02-06 22:48 Christian Stalp
2008-02-07 0:10 ` Paul Jackson
2008-02-10 22:25 Christian Stalp
2008-02-12 14:17 ` Stephen Kratzer
2008-02-12 16:31 ` Paul Jackson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b21328ed0802061321m276e4634v760cb71909c18a90@mail.gmail.com \
--to=aluink@gmail.com \
--cc=linux-c-programming@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).