summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorportix <portix@gmx.net>2014-02-26 09:52:47 +0100
committerportix <portix@gmx.net>2014-02-26 09:52:47 +0100
commita5f3f15bf9704fe6e7188d0d37fded1887f59335 (patch)
treeb55d969a47bff30972197b1899debc76821c30c0
parent828206f7e300655f30fd2ad57f1d66ffe74d9b7f (diff)
downloaddwb-a5f3f15bf9704fe6e7188d0d37fded1887f59335.zip
Remove unused function modulo; fixing no return value in scripts_load_chrome
-rw-r--r--src/scripts.c2
-rw-r--r--src/util.c8
2 files changed, 1 insertions, 9 deletions
diff --git a/src/scripts.c b/src/scripts.c
index e573528c..b1487efd 100644
--- a/src/scripts.c
+++ b/src/scripts.c
@@ -7246,7 +7246,7 @@ exec_namespace_function(JSContextRef ctx, const char *namespace_name, const char
gboolean
scripts_load_chrome(JSObjectRef wv, const char *uri)
{
- g_return_if_fail(uri != NULL);
+ g_return_val_if_fail(uri != NULL, false);
gboolean ret = false;
EXEC_LOCK;
diff --git a/src/util.c b/src/util.c
index c98c6f31..c372d1cd 100644
--- a/src/util.c
+++ b/src/util.c
@@ -932,14 +932,6 @@ util_string_to_sanitize(const char *string)
g_strfreev(token);
return s;
}
-inline static int
-dwb_floor(double x) {
- return x >= 0 ? (int) x : (int) x - 1;
-}
-inline static int
-modulo(int x, int y) {
- return x - dwb_floor((double)x/y) * y;
-}
int
util_modulo(int x, int y)
{