Make ds_put_char_multiple() use the provided character instead of a space.
authorBen Pfaff <blp@nicira.com>
Thu, 11 Dec 2008 17:35:24 +0000 (09:35 -0800)
committerBen Pfaff <blp@nicira.com>
Thu, 11 Dec 2008 17:35:24 +0000 (09:35 -0800)
Fortunately this function was only used for formatting log messages, in
a context where spaces were the normal padding character.

Found by Chris Eagle.

lib/dynamic-string.c

index f67a63f..2fe8cfb 100644 (file)
@@ -91,7 +91,7 @@ ds_put_char(struct ds *ds, char c)
 void
 ds_put_char_multiple(struct ds *ds, char c, size_t n)
 {
-    memset(ds_put_uninit(ds, n), ' ', n);
+    memset(ds_put_uninit(ds, n), c, n);
 }
 
 void