[librest/wip/baedert/tests: 6/27] proxy-call: Don't default to "GET" for NULL method
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librest/wip/baedert/tests: 6/27] proxy-call: Don't default to "GET" for NULL method
- Date: Tue, 21 Feb 2017 17:02:41 +0000 (UTC)
commit ed129beedce73ab537a31bd1365f1bafbbad0aa1
Author: Timm Bäder <mail baedert org>
Date: Tue Feb 21 17:08:17 2017 +0100
proxy-call: Don't default to "GET" for NULL method
Allowing NULL parameter values and then changing that to "GET" seems
weird, so just check that the given method is !NULL and use it in any
case.
rest/rest-proxy-call.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/rest/rest-proxy-call.c b/rest/rest-proxy-call.c
index 5fba507..70d1214 100644
--- a/rest/rest-proxy-call.c
+++ b/rest/rest-proxy-call.c
@@ -220,13 +220,10 @@ rest_proxy_call_set_method (RestProxyCall *call,
RestProxyCallPrivate *priv = GET_PRIVATE (call);
g_return_if_fail (REST_IS_PROXY_CALL (call));
+ g_return_if_fail (method != NULL);
g_free (priv->method);
-
- if (method)
- priv->method = g_strdup (method);
- else
- priv->method = g_strdup ("GET");
+ priv->method = g_strdup (method);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]