1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-15 23:35:34 +00:00

[idn2] Warnings when built with -Didn=false . Spotted by jon

This commit is contained in:
Witold Filipczyk 2024-04-18 19:08:23 +02:00
parent cdf02f5e0c
commit 4d7e94c5e4

View File

@ -166,8 +166,11 @@ lookup_cmd(struct option *o, char ***argv, int *argc)
{
struct sockaddr_storage *addrs = NULL;
int addrno, i;
char *idname, *idname2;
char *idname;
#ifdef CONFIG_IDN2
char *idname2 = NULL;
int allocated = 0;
#endif
if (!*argc) return gettext("Parameter expected");
if (*argc > 1) return gettext("Too many parameters");
@ -193,9 +196,12 @@ lookup_cmd(struct option *o, char ***argv, int *argc)
#else
usrerror(gettext("Host not found"));
#endif
#ifdef CONFIG_IDN2
if (allocated) {
free(idname2);
}
#endif
return "";
}
@ -224,9 +230,11 @@ lookup_cmd(struct option *o, char ***argv, int *argc)
fflush(stdout);
#ifdef CONFIG_IDN2
if (allocated) {
free(idname2);
}
#endif
return "";
}