mirror of
https://github.com/rkd77/elinks.git
synced 2025-01-03 14:57:44 -05:00
Fix compilation of perl hooks
It complains here that n_a might be used uninitialized and POPpx doesn't set anything like it.
This commit is contained in:
parent
9412cc77f0
commit
0f8ee055db
@ -44,11 +44,10 @@ do_script_hook_goto_url(struct session *ses, unsigned char **url)
|
|||||||
if (SvTRUE(ERRSV)) count = 0; /* FIXME: error message ? */
|
if (SvTRUE(ERRSV)) count = 0; /* FIXME: error message ? */
|
||||||
SPAGAIN;
|
SPAGAIN;
|
||||||
if (count == 1) {
|
if (count == 1) {
|
||||||
STRLEN n_a; /* Used by POPpx macro. */
|
|
||||||
unsigned char *new_url = POPpx;
|
unsigned char *new_url = POPpx;
|
||||||
|
|
||||||
if (new_url) {
|
if (new_url) {
|
||||||
unsigned char *n = memacpy(new_url, n_a);
|
unsigned char *n = stracpy(new_url);
|
||||||
|
|
||||||
if (n) {
|
if (n) {
|
||||||
mem_free_set(url, n);
|
mem_free_set(url, n);
|
||||||
@ -90,11 +89,10 @@ do_script_hook_follow_url(unsigned char **url)
|
|||||||
if (SvTRUE(ERRSV)) count = 0; /* FIXME: error message ? */
|
if (SvTRUE(ERRSV)) count = 0; /* FIXME: error message ? */
|
||||||
SPAGAIN;
|
SPAGAIN;
|
||||||
if (count == 1) {
|
if (count == 1) {
|
||||||
STRLEN n_a; /* Used by POPpx macro. */
|
|
||||||
unsigned char *new_url = POPpx;
|
unsigned char *new_url = POPpx;
|
||||||
|
|
||||||
if (new_url) {
|
if (new_url) {
|
||||||
unsigned char *n = memacpy(new_url, n_a);
|
unsigned char *n = stracpy(new_url);
|
||||||
|
|
||||||
if (n) {
|
if (n) {
|
||||||
mem_free_set(url, n);
|
mem_free_set(url, n);
|
||||||
@ -137,11 +135,10 @@ do_script_hook_pre_format_html(unsigned char *url, struct cache_entry *cached,
|
|||||||
if (SvTRUE(ERRSV)) count = 0; /* FIXME: error message ? */
|
if (SvTRUE(ERRSV)) count = 0; /* FIXME: error message ? */
|
||||||
SPAGAIN;
|
SPAGAIN;
|
||||||
if (count == 1) {
|
if (count == 1) {
|
||||||
STRLEN n_a; /* Used by POPpx macro. */
|
|
||||||
unsigned char *new_html = POPpx;
|
unsigned char *new_html = POPpx;
|
||||||
|
|
||||||
if (new_html) {
|
if (new_html) {
|
||||||
int len = n_a;
|
int len = strlen(new_html);
|
||||||
|
|
||||||
add_fragment(cached, 0, new_html, len);
|
add_fragment(cached, 0, new_html, len);
|
||||||
normalize_cache_entry(cached, len);
|
normalize_cache_entry(cached, len);
|
||||||
@ -188,10 +185,9 @@ do_script_hook_get_proxy(unsigned char **new_proxy_url, unsigned char *url)
|
|||||||
(void) POPs;
|
(void) POPs;
|
||||||
mem_free_set(new_proxy_url, NULL);
|
mem_free_set(new_proxy_url, NULL);
|
||||||
} else {
|
} else {
|
||||||
STRLEN n_a; /* Used by POPpx macro. */
|
|
||||||
unsigned char *new_url = POPpx;
|
unsigned char *new_url = POPpx;
|
||||||
|
|
||||||
mem_free_set(new_proxy_url, memacpy(new_url, n_a));
|
mem_free_set(new_proxy_url, stracpy(new_url));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user