Skip to content

Commit

Permalink
Remove duplicate branches in request of plugins
Browse files Browse the repository at this point in the history
The check for whether the name contains "ipv6" is not necessary for
the plugins "dnshome" and "ipv64", as the code path for both branches is the
same.
Furthermore the check is rather confusing in the context of the
provider named "ipv64.net", as "ipv6" is also contained in the
provider name itself.
  • Loading branch information
hrzlgnm committed Sep 23, 2024
1 parent 46d6ad9 commit 781672b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
10 changes: 0 additions & 10 deletions plugins/dnshome.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,6 @@ static ddns_system_t plugin_v6 = {

static int request(ddns_t *ctx, ddns_info_t *info, ddns_alias_t *alias)
{
if (strstr(info->system->name, "ipv6"))
return snprintf(ctx->request_buf, ctx->request_buflen,
info->system->server_req,
info->server_url,
alias->name,
alias->address,
info->server_name.name,
info->creds.encoded_password,
info->user_agent);

return snprintf(ctx->request_buf, ctx->request_buflen,
info->system->server_req,
info->server_url,
Expand Down
10 changes: 0 additions & 10 deletions plugins/ipv64.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,6 @@ static ddns_system_t plugin_v6 = {

static int request(ddns_t *ctx, ddns_info_t *info, ddns_alias_t *alias)
{
if (strstr(info->system->name, "ipv6"))
return snprintf(ctx->request_buf, ctx->request_buflen,
info->system->server_req,
info->server_url,
alias->name,
alias->address,
info->server_name.name,
info->creds.encoded_password,
info->user_agent);

return snprintf(ctx->request_buf, ctx->request_buflen,
info->system->server_req,
info->server_url,
Expand Down

0 comments on commit 781672b

Please sign in to comment.