[ovs-dev] [PATCH 13/15] jsonrpc: Add comment for jsonrpc_msg_to_json().

Ben Pfaff blp at ovn.org
Mon Jan 1 05:16:38 UTC 2018


>From a glance at the prototype it wasn't obvious that it destroyed its
argument.

Signed-off-by: Ben Pfaff <blp at ovn.org>
---
 lib/jsonrpc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/jsonrpc.c b/lib/jsonrpc.c
index a8e5bc8434ad..f8786f909ac8 100644
--- a/lib/jsonrpc.c
+++ b/lib/jsonrpc.c
@@ -716,6 +716,9 @@ exit:
     return error;
 }
 
+/* Returns 'm' converted to JSON suitable for sending as a JSON-RPC message.
+ *
+ * Consumes and destroys 'm'. */
 struct json *
 jsonrpc_msg_to_json(struct jsonrpc_msg *m)
 {
-- 
2.10.2



More information about the dev mailing list