diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-03-18 18:56:33 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-03-18 18:56:33 +0000 |
commit | 14c13854d3cae9d93c3d148be30fb72f1eaffe55 (patch) | |
tree | 7b1a3e41b75490fac4d45722c90a1847543c6796 /src/libserver/http/http_util.c | |
parent | 6b2b4167187fee09365271cca182866ecb029af3 (diff) | |
download | rspamd-14c13854d3cae9d93c3d148be30fb72f1eaffe55.tar.gz rspamd-14c13854d3cae9d93c3d148be30fb72f1eaffe55.zip |
[Rework] Further types conversion (no functional changes)
Diffstat (limited to 'src/libserver/http/http_util.c')
-rw-r--r-- | src/libserver/http/http_util.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/libserver/http/http_util.c b/src/libserver/http/http_util.c index b43785be6..13469155e 100644 --- a/src/libserver/http/http_util.c +++ b/src/libserver/http/http_util.c @@ -18,22 +18,22 @@ #include "libutil/printf.h" #include "libutil/util.h" -static const gchar *http_week[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}; -static const gchar *http_month[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", - "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; +static const char *http_week[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}; +static const char *http_month[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", + "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; /* * Obtained from nginx * Copyright (C) Igor Sysoev */ -static guint mday[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; +static unsigned int mday[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; time_t -rspamd_http_parse_date(const gchar *header, gsize len) +rspamd_http_parse_date(const char *header, gsize len) { - const gchar *p, *end; - gint month; - guint day, year, hour, min, sec; + const char *p, *end; + int month; + unsigned int day, year, hour, min, sec; uint64_t time; enum { no = 0, @@ -282,7 +282,7 @@ rspamd_http_parse_date(const gchar *header, gsize len) return (time_t) time; } -glong rspamd_http_date_format(gchar *buf, gsize len, time_t time) +glong rspamd_http_date_format(char *buf, gsize len, time_t time) { struct tm tms; |