diff options
author | Dimitri Staessens <dimitri@ouroboros.rocks> | 2023-11-27 14:43:10 +0100 |
---|---|---|
committer | Sander Vrijders <sander@ouroboros.rocks> | 2023-11-29 09:57:29 +0100 |
commit | 3f24301fff9c544dfe2b89c5737bc3cdf94ef9a9 (patch) | |
tree | 35e04e27e4a0e11c91fe3aa201004ac1d83a72e0 /src/lib | |
parent | c1d679506180bc23241fe14818c0a2dbbcbe3cef (diff) | |
download | ouroboros-3f24301fff9c544dfe2b89c5737bc3cdf94ef9a9.tar.gz ouroboros-3f24301fff9c544dfe2b89c5737bc3cdf94ef9a9.zip |
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 <dimitri@ouroboros.rocks>
Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/pb/ipcp_config.proto | 4 | ||||
-rw-r--r-- | src/lib/protobuf.c | 8 |
2 files changed, 6 insertions, 6 deletions
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; } |