diff options
author | zhangliping <zhangliping02@baidu.com> | 2018-02-24 11:30:58 +0800 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2018-02-26 11:53:00 -0800 |
commit | c9bc8c110eda65a36a958bc7ad7111b0f846f3c1 (patch) | |
tree | 4c0004dbca38779dc79c81b842440a9eed185e00 /lib | |
parent | 48b1008c0b97518ee3c409969bab8588cf4b090e (diff) | |
download | openvswitch-c9bc8c110eda65a36a958bc7ad7111b0f846f3c1.tar.gz |
vlog: fix the incorrect zero padding in format_log_message
If the format specifier does not have the 0 flag, we should pad with
blanks instead of zeroes.
Signed-off-by: zhangliping <zhangliping02@baidu.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Mark Michelson <mmichels@redhat.com>
Tested-by: Mark Michelson <mmichels@redhat.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/vlog.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/vlog.c b/lib/vlog.c index f28695043..0e862a773 100644 --- a/lib/vlog.c +++ b/lib/vlog.c @@ -952,7 +952,7 @@ format_log_message(const struct vlog_module *module, enum vlog_level level, for (p = pattern; *p != '\0'; ) { const char *subprogram_name; enum { LEFT, RIGHT } justify = RIGHT; - int pad = '0'; + int pad = ' '; size_t length, field, used; if (*p != '%') { |