aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorNunoSempere <nuno.semperelh@protonmail.com>2024-03-23 16:58:23 -0300
committerNunoSempere <nuno.semperelh@protonmail.com>2024-03-23 16:58:23 -0300
commitc8ff246cc256633820a18d6cc149d027082216e1 (patch)
tree1df423b75b3795ce95741d6ae8cd67ec2ddbb04a /plugins
parent43cac7f3f1d5c46ee45119dd5081bdad5b2f9332 (diff)
remove extraneous tmp vars in libre_redirect
Diffstat (limited to 'plugins')
-rw-r--r--plugins/libre_redirect/libre_redirect.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/plugins/libre_redirect/libre_redirect.c b/plugins/libre_redirect/libre_redirect.c
index f329e12..b8194e1 100644
--- a/plugins/libre_redirect/libre_redirect.c
+++ b/plugins/libre_redirect/libre_redirect.c
@@ -13,7 +13,6 @@ int libre_redirect(const char* uri, char* output)
{
int len_uri = strlen(uri);
int len_output = strlen(output);
- char tmp_uri[len_output++];
if ((len_output - len_uri) < LIBRE_N) {
printf("Not enough memory\n");
@@ -47,9 +46,8 @@ int libre_redirect(const char* uri, char* output)
int len = sizeof(annoying_sites) / sizeof(annoying_sites[0]);
for (int i = 0; i < len; i++) {
- strcpy(tmp_uri, uri);
str_init(output, len_output);
- int replace_check = str_replace_start(tmp_uri, annoying_sites[i],
+ int replace_check = str_replace_start(uri, annoying_sites[i],
alternatives[i], output);
switch(replace_check){
case 0: // no match found