mirror of
https://github.com/openvswitch/ovs
synced 2025-10-29 15:28:56 +00:00
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>
This commit is contained in:
@@ -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 != '%') {
|
||||
|
||||
Reference in New Issue
Block a user