diff options
author | Richard Wilson <rjw@netsurf-browser.org> | 2004-12-09 10:30:44 +0000 |
---|---|---|
committer | Richard Wilson <rjw@netsurf-browser.org> | 2004-12-09 10:30:44 +0000 |
commit | 32db7e04d0c3bd255b2e8aa7dbd7c2b884b35614 (patch) | |
tree | 312984b2b972916fd10e1efc338d08e437d55b70 /riscos/401login.c | |
parent | 77a96712244ad4a8b4bde235aa051372a64a8789 (diff) | |
download | netsurf-32db7e04d0c3bd255b2e8aa7dbd7c2b884b35614.tar.gz netsurf-32db7e04d0c3bd255b2e8aa7dbd7c2b884b35614.tar.bz2 |
[project @ 2004-12-09 10:30:43 by rjw]
Re-implementation of hotlist via general tree code. Animations can be stopped once more. Purged a few xcalloc() calls.
svn path=/import/netsurf/; revision=1394
Diffstat (limited to 'riscos/401login.c')
-rw-r--r-- | riscos/401login.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/riscos/401login.c b/riscos/401login.c index b2f3cf4f0..c9fe9a895 100644 --- a/riscos/401login.c +++ b/riscos/401login.c @@ -27,9 +27,9 @@ static void get_unamepwd(void); static wimp_window *dialog_401_template; extern wimp_w dialog_401li; -static char *uname; +static char uname[256]; static char *url; -static char *pwd; +static char pwd[256]; static struct browser_window *bwin; @@ -66,8 +66,6 @@ void gui_401login_open(struct browser_window *bw, struct content *c, char *realm void ro_gui_401login_open(wimp_w parent, char *host, char* realm, char *fetchurl) { url = xstrdup(fetchurl); - uname = xcalloc(1, 256); - pwd = xcalloc(1, 256); uname[0] = pwd[0] = 0; /* fill in download window icons */ @@ -128,9 +126,12 @@ void ro_gui_401login_click(wimp_pointer *pointer) void get_unamepwd(void) { - char *lidets = xcalloc(strlen(uname)+strlen(pwd)+2, sizeof(char)); - if (lidets == NULL) + char *lidets = calloc(strlen(uname)+strlen(pwd)+2, sizeof(char)); + if (!lidets) { + LOG(("Insufficient memory for calloc")); + warn_user("NoMemory", 0); return; + } sprintf(lidets, "%s:%s", uname, pwd); |