summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-10-02 14:15:21 +0800
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-10-02 14:15:21 +0800
commit829fd1f2baf9e92511683982d2a51244301c4837 (patch)
tree29fa870f531097a7cd8d660d342ed890b4dd76e0
parentf9e3eb4c9cf83d724d510f20391ab8f88f68fd71 (diff)
No result namespace
but the argument name should still explains that the format is a result one
-rw-r--r--rtclient/ticket.h10
-rw-r--r--ticket.c6
2 files changed, 8 insertions, 8 deletions
diff --git a/rtclient/ticket.h b/rtclient/ticket.h
index 9aaf656..ec4d422 100644
--- a/rtclient/ticket.h
+++ b/rtclient/ticket.h
@@ -6,10 +6,10 @@ struct rtclient_ticket {
char *subject;
};
-enum rtclient_ticket_result_format {
- RTCLIENT_TICKET_RESULT_FORMAT_S = 0
- , RTCLIENT_TICKET_RESULT_FORMAT_I
- , RTCLIENT_TICKET_RESULT_FORMAT_L
+enum rtclient_ticket_format {
+ RTCLIENT_TICKET_FORMAT_S = 0
+ , RTCLIENT_TICKET_FORMAT_I
+ , RTCLIENT_TICKET_FORMAT_L
};
enum rtclient_ticket_history_type {
@@ -78,7 +78,7 @@ extern "C" {
, const char *text);
void rtclient_ticket_history(struct rtclient_ticket_history_list **listptr
, unsigned int id
- , enum rtclient_ticket_result_format result_format);
+ , enum rtclient_ticket_format format);
void rtclient_ticket_history_free
(struct rtclient_ticket_history *history);
void rtclient_ticket_history_list_free
diff --git a/ticket.c b/ticket.c
index 658df7f..795e750 100644
--- a/ticket.c
+++ b/ticket.c
@@ -295,18 +295,18 @@ static size_t history_l_handler(void *contents, size_t size, size_t nmemb
void rtclient_ticket_history(rtclient_ticket_history_list **listptr
, unsigned int id
- , enum rtclient_ticket_result_format result_format)
+ , enum rtclient_ticket_format result_format)
{
*listptr = malloc(sizeof(rtclient_ticket_history_list));
(*listptr)->length = 0;
size_t (*handler)(void *, size_t, size_t, void *) = history_s_handler;
char format = 's';
switch (result_format) {
- case RTCLIENT_TICKET_RESULT_FORMAT_I:
+ case RTCLIENT_TICKET_FORMAT_I:
handler = history_i_handler;
format = 'i';
break;
- case RTCLIENT_TICKET_RESULT_FORMAT_L:
+ case RTCLIENT_TICKET_FORMAT_L:
handler = history_l_handler;
format = 'l';
break;