From 32db7e04d0c3bd255b2e8aa7dbd7c2b884b35614 Mon Sep 17 00:00:00 2001 From: Richard Wilson Date: Thu, 9 Dec 2004 10:30:44 +0000 Subject: [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 --- riscos/401login.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'riscos/401login.c') 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); -- cgit v1.2.3