qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From astitc...@apache.org
Subject qpid-proton git commit: PROTON-767: Allow send-async to compile as C89
Date Thu, 04 Dec 2014 23:34:48 GMT
Repository: qpid-proton
Updated Branches:
  refs/heads/master fc798f550 -> de338469b


PROTON-767: Allow send-async to compile as C89


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/de338469
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/de338469
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/de338469

Branch: refs/heads/master
Commit: de338469b3e3c5a043544cc0c208bf6a8880fdc5
Parents: fc798f5
Author: Andrew Stitcher <astitcher@apache.org>
Authored: Thu Dec 4 18:35:54 2014 -0500
Committer: Andrew Stitcher <astitcher@apache.org>
Committed: Thu Dec 4 18:35:54 2014 -0500

----------------------------------------------------------------------
 examples/messenger/c/send-async.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/de338469/examples/messenger/c/send-async.c
----------------------------------------------------------------------
diff --git a/examples/messenger/c/send-async.c b/examples/messenger/c/send-async.c
index 2c76e6c..846f8e2 100644
--- a/examples/messenger/c/send-async.c
+++ b/examples/messenger/c/send-async.c
@@ -95,9 +95,11 @@ void onerror(int fd, int errno, const char* msg, void* userData) {
 int main(int argc, char** argv)
 {
     int c;
-    opterr = 0;
     char * address = (char *) "amqp://0.0.0.0";
     char * msgtext = (char *) "Hello World!";
+    pn_data_t* body;
+
+    opterr = 0;
 
     while((c = getopt(argc, argv, "ha:b:c:")) != -1)
     {
@@ -135,7 +137,7 @@ int main(int argc, char** argv)
     pn_messenger_start(messenger);
 
     pn_message_set_address(message, address);
-    pn_data_t* body = pn_message_body(message);
+    body = pn_message_body(message);
     pn_data_put_string(body, pn_bytes(strlen(msgtext), msgtext));
 
     pn_messenger_put(messenger, message);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message