[ovs-dev] [PATCH 03/13] log: Make json parameter to ovsdb_log_write() const.
Ben Pfaff
blp at ovn.org
Fri Dec 8 00:12:30 UTC 2017
Signed-off-by: Ben Pfaff <blp at ovn.org>
---
ovsdb/log.c | 4 +++-
ovsdb/log.h | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/ovsdb/log.c b/ovsdb/log.c
index d9fedd9ded6c..1a372d7b73ee 100644
--- a/ovsdb/log.c
+++ b/ovsdb/log.c
@@ -360,8 +360,10 @@ ovsdb_log_unread(struct ovsdb_log *file)
file->offset = file->prev_offset;
}
+/* 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)
{
uint8_t sha1[SHA1_DIGEST_SIZE];
struct ovsdb_error *error;
diff --git a/ovsdb/log.h b/ovsdb/log.h
index fbcea1f2b991..fd495e518dd0 100644
--- a/ovsdb/log.h
+++ b/ovsdb/log.h
@@ -41,7 +41,7 @@ struct ovsdb_error *ovsdb_log_read(struct ovsdb_log *, struct json **)
OVS_WARN_UNUSED_RESULT;
void ovsdb_log_unread(struct ovsdb_log *);
-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;
--
2.10.2
More information about the dev
mailing list