bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-wget] Fix const usage in iri.c


From: Ángel González
Subject: [Bug-wget] Fix const usage in iri.c
Date: Mon, 06 Apr 2015 22:24:12 +0200
User-agent: Thunderbird

While looking at Hubert patch to iri.c (and surrounding code) I noticed that remote_to_utf8 declared the output parameter as const char** (instead of char**) and there was a number casting around to (const char **) and (char *) in the file.

The following patch fixes the prototypes to have sensible values and manages to remove all those casts (I was afraid of still needing one at iconv(3) call).


Sadly, it produces a trivial conflict with Hubert patch due to the rname of the variable 'new':
-      if (!remote_to_utf8 (i, (const char *) host, (const char **) &new))
+      if (!remote_to_utf8 (i, host, &new))
vs
-      if (!remote_to_utf8 (i, (const char *) host, (const char **)&new))
+      if (!remote_to_utf8 (i, (const char *) host, (const char 
**)&utf8_encoded))
with the merge of both being
+      if (!remote_to_utf8 (i, host,&utf8_encoded))

Cheers

Attachment: 0001-Fix-const-usage-in-iri.c.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]