summaryrefslogtreecommitdiff
path: root/desktop/scrollbar.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2016-04-26 12:14:56 +0100
committerVincent Sanders <vince@kyllikki.org>2016-04-26 12:14:56 +0100
commit69cea38f41b411ca9e55db365cf94339f4be891c (patch)
tree030fc58fa0cad7a75e02e1ea96562d9653a6c7a7 /desktop/scrollbar.c
parentdd14807c8cdff2f486f5da832490ff958c87ba62 (diff)
downloadnetsurf-69cea38f41b411ca9e55db365cf94339f4be891c.tar.gz
netsurf-69cea38f41b411ca9e55db365cf94339f4be891c.tar.bz2
update scrollbar_create error handling to return nserror
Diffstat (limited to 'desktop/scrollbar.c')
-rw-r--r--desktop/scrollbar.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/desktop/scrollbar.c b/desktop/scrollbar.c
index caed13fbc..82fcac1c9 100644
--- a/desktop/scrollbar.c
+++ b/desktop/scrollbar.c
@@ -70,9 +70,9 @@ struct scrollbar {
/*
- * Exported function. Documented in scrollbar.h
+ * Exported function. Documented in desktop/scrollbar.h
*/
-bool scrollbar_create(bool horizontal, int length, int full_size,
+nserror scrollbar_create(bool horizontal, int length, int full_size,
int visible_size, void *client_data,
scrollbar_client_callback client_callback,
struct scrollbar **s)
@@ -82,10 +82,8 @@ bool scrollbar_create(bool horizontal, int length, int full_size,
scrollbar = malloc(sizeof(struct scrollbar));
if (scrollbar == NULL) {
- LOG("malloc failed");
- warn_user("NoMemory", 0);
*s = NULL;
- return false;
+ return NSERROR_NOMEM;
}
scrollbar->horizontal = horizontal;
@@ -109,7 +107,7 @@ bool scrollbar_create(bool horizontal, int length, int full_size,
*s = scrollbar;
- return true;
+ return NSERROR_OK;
}