summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rtclient.c12
-rw-r--r--rtclient.h2
2 files changed, 7 insertions, 7 deletions
diff --git a/rtclient.c b/rtclient.c
index 04332c7..400cc66 100644
--- a/rtclient.c
+++ b/rtclient.c
@@ -82,8 +82,8 @@ user_callback(void *contents, size_t size, size_t nmemb, void *writedata)
lines[i++] = line;
line = strtok(NULL, "\n");
}
- rt_user **userp = (rt_user **)writedata;
- rt_user *user = *userp;
+ rt_user **userptr = (rt_user **)writedata;
+ rt_user *user = *userptr;
for (unsigned short i = 0; i < nproperties; i++) {
char *token = strtok(lines[i], ":");
if (!strcmp(token, "id")) {
@@ -195,13 +195,13 @@ static inline void request(const char *path, const char *suffix)
curl_easy_perform(curl);
}
-bool rtclient_get_user(rt_user **user, const char *name)
+bool rtclient_get_user(rt_user **userptr, const char *name)
{
- *user = malloc(sizeof(rt_user));
- curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)user);
+ *userptr = malloc(sizeof(rt_user));
+ curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)userptr);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, user_callback);
request("/REST/1.0/user/", name);
- return (bool)(*user);
+ return (bool)(*userptr);
}
void rtclient_search(const char *query)
diff --git a/rtclient.h b/rtclient.h
index 32028b1..1fbf589 100644
--- a/rtclient.h
+++ b/rtclient.h
@@ -9,7 +9,7 @@ extern "C" {
bool rtclient_init(const char *server_url);
void rtclient_login(const char *name, const char *password);
- bool rtclient_get_user(struct rt_user **user, const char *name);
+ bool rtclient_get_user(struct rt_user **userptr, const char *name);
void rtclient_search(const char *query);
void rtclient_user_free(struct rt_user *user);
void rtclient_cleanup();