From 3f24301fff9c544dfe2b89c5737bc3cdf94ef9a9 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Mon, 27 Nov 2023 14:43:10 +0100 Subject: include: Rename layer.layer_name to layer.name The layer_info had a member layer_name which is a bit redundant. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/lib/pb/ipcp_config.proto | 4 ++-- src/lib/protobuf.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/lib') diff --git a/src/lib/pb/ipcp_config.proto b/src/lib/pb/ipcp_config.proto index 1ff304f1..9c24cabe 100644 --- a/src/lib/pb/ipcp_config.proto +++ b/src/lib/pb/ipcp_config.proto @@ -23,8 +23,8 @@ syntax = "proto2"; message layer_info_msg { - required string layer_name = 1; - required uint32 dir_hash_algo = 2; + required string name = 1; + required uint32 dir_hash_algo = 2; } message dt_config_msg { diff --git a/src/lib/protobuf.c b/src/lib/protobuf.c index 937e4efc..7fbcef8c 100644 --- a/src/lib/protobuf.c +++ b/src/lib/protobuf.c @@ -40,8 +40,8 @@ layer_info_msg_t * layer_info_s_to_msg(const struct layer_info * s) layer_info_msg__init(msg); - msg->layer_name = strdup(s->layer_name); - if (msg->layer_name == NULL) + msg->name = strdup(s->name); + if (msg->name == NULL) goto fail_msg; msg->dir_hash_algo = s->dir_hash_algo; @@ -59,10 +59,10 @@ struct layer_info layer_info_msg_to_s(const layer_info_msg_t * msg) struct layer_info s; assert(msg != NULL); - assert(strlen(msg->layer_name) <= LAYER_NAME_SIZE); + assert(strlen(msg->name) <= LAYER_NAME_SIZE); s.dir_hash_algo = msg->dir_hash_algo; - strcpy(s.layer_name, msg->layer_name); + strcpy(s.name, msg->name); return s; } -- cgit v1.2.3