@@ -2582,14 +2582,8 @@ char *
ovsdb_data_row_name(const struct uuid *uuid)
{
char *name;
- char *p;
- name = xasprintf("row"UUID_FMT, UUID_ARGS(uuid));
- for (p = name; *p != '\0'; p++) {
- if (*p == '-') {
- *p = '_';
- }
- }
+ name = xasprintf(UUID_ROW_FMT, UUID_ARGS(uuid));
return name;
}
@@ -34,6 +34,7 @@ extern "C" {
*/
#define UUID_LEN 36
#define UUID_FMT "%08x-%04x-%04x-%04x-%04x%08x"
+#define UUID_ROW_FMT "row%08x_%04x_%04x_%04x_%04x%08x"
#define UUID_ARGS(UUID) \
((unsigned int) ((UUID)->parts[0])), \
((unsigned int) ((UUID)->parts[1] >> 16)), \
Signed-off-by: Grigorii Nazarov <whitecrowbar@gmail.com> --- v2: fixed title v4: changed patch number from 2/4 to 1/3 lib/ovsdb-data.c | 8 +------- lib/uuid.h | 1 + 2 files changed, 2 insertions(+), 7 deletions(-)