diff options
author | Ben Pfaff <blp@ovn.org> | 2017-12-05 08:33:50 -0800 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2017-12-24 11:47:03 -0800 |
commit | 226600d917ac1371bfc264e1561d9de7657a0f17 (patch) | |
tree | fa862319904fc937764b4e775f16e98f375d119a /ovsdb | |
parent | 4407aa48cdac79db6974181dad53f92e7f534ec8 (diff) | |
download | openvswitch-226600d917ac1371bfc264e1561d9de7657a0f17.tar.gz |
log: Make json parameter to ovsdb_log_write() const.
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org>
Diffstat (limited to 'ovsdb')
-rw-r--r-- | ovsdb/log.c | 4 | ||||
-rw-r--r-- | ovsdb/log.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/ovsdb/log.c b/ovsdb/log.c index 81c35c9f2..a3afb674f 100644 --- a/ovsdb/log.c +++ b/ovsdb/log.c @@ -386,8 +386,10 @@ ovsdb_log_compose_record(const struct json *json, magic, data->length, SHA1_ARGS(sha1)); } +/* Writes log record 'json' to 'file'. Returns NULL if successful or an error + * (which the caller must eventually destroy) on failure. */ struct ovsdb_error * -ovsdb_log_write(struct ovsdb_log *file, struct json *json) +ovsdb_log_write(struct ovsdb_log *file, const struct json *json) { struct ovsdb_error *error; diff --git a/ovsdb/log.h b/ovsdb/log.h index de881e825..8bba3f1b7 100644 --- a/ovsdb/log.h +++ b/ovsdb/log.h @@ -45,7 +45,7 @@ void ovsdb_log_unread(struct ovsdb_log *); void ovsdb_log_compose_record(const struct json *, const char *magic, struct ds *header, struct ds *data); -struct ovsdb_error *ovsdb_log_write(struct ovsdb_log *, struct json *) +struct ovsdb_error *ovsdb_log_write(struct ovsdb_log *, const struct json *) OVS_WARN_UNUSED_RESULT; struct ovsdb_error *ovsdb_log_commit(struct ovsdb_log *) OVS_WARN_UNUSED_RESULT; |