summaryrefslogtreecommitdiff
path: root/ovsdb/log.c
diff options
context:
space:
mode:
authorAlin Serdean <aserdean@cloudbasesolutions.com>2013-11-25 23:38:48 -0800
committerBen Pfaff <blp@nicira.com>2013-11-25 23:38:59 -0800
commit34582733d9aad82bba60f4bf986b62d58412502a (patch)
tree9f42e24f813d7059b6c0ef529e1b631b443e53cb /ovsdb/log.c
parent4d3daf048134e8c375fdadcec7e51d1dc28fe0b6 (diff)
downloadopenvswitch-34582733d9aad82bba60f4bf986b62d58412502a.tar.gz
Avoid printf type modifiers not supported by MSVC C runtime library.
The MSVC C library printf() implementation does not support the 'z', 't', 'j', or 'hh' format specifiers. This commit changes the Open vSwitch code to avoid those format specifiers, switching to standard macros from <inttypes.h> where available and inventing new macros resembling them where necessary. It also updates CodingStyle to specify the macros' use and adds a Makefile rule to report violations. Signed-off-by: Alin Serdean <aserdean@cloudbasesolutions.com> Co-authored-by: Ben Pfaff <blp@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'ovsdb/log.c')
-rw-r--r--ovsdb/log.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ovsdb/log.c b/ovsdb/log.c
index 131602576..ed72ca408 100644
--- a/ovsdb/log.c
+++ b/ovsdb/log.c
@@ -356,7 +356,7 @@ ovsdb_log_write(struct ovsdb_log *file, struct json *json)
/* Compose header. */
sha1_bytes(json_string, length, sha1);
- snprintf(header, sizeof header, "%s%zu "SHA1_FMT"\n",
+ snprintf(header, sizeof header, "%s%"PRIuSIZE" "SHA1_FMT"\n",
magic, length, SHA1_ARGS(sha1));
/* Write. */