diff options
author | Xavier Roche <xroche@users.noreply.github.com> | 2014-05-23 21:33:43 +0000 |
---|---|---|
committer | Xavier Roche <xroche@users.noreply.github.com> | 2014-05-23 21:33:43 +0000 |
commit | cefcc0426613cc761373e785980c87c77f8a8cb5 (patch) | |
tree | e64653268bcb93fc50bf23d22e38799c5bb31adc /src/htsbauth.h | |
parent | 6ba50a2001bcfa1b467f69985a002fc064d8c807 (diff) |
"const correctness" cleanup
added the following default flags:
-Wformat
-Wformat-security
-Wmultichar
-Wwrite-strings
fixed several other warnings
Diffstat (limited to 'src/htsbauth.h')
-rw-r--r-- | src/htsbauth.h | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/htsbauth.h b/src/htsbauth.h index 248097e..dd57070 100644 --- a/src/htsbauth.h +++ b/src/htsbauth.h @@ -34,6 +34,8 @@ Please visit our Website: http://www.httrack.com #ifndef HTSBAUTH_DEFH #define HTSBAUTH_DEFH +#include <sys/types.h> + // robots wizard #ifndef HTS_DEF_FWSTRUCT_bauth_chain #define HTS_DEF_FWSTRUCT_bauth_chain @@ -60,21 +62,21 @@ struct t_cookie { #ifdef HTS_INTERNAL_BYTECODE // cookies -int cookie_add(t_cookie * cookie, char *cook_name, char *cook_value, - char *domain, char *path); -int cookie_del(t_cookie * cookie, char *cook_name, char *domain, char *path); +int cookie_add(t_cookie * cookie, const char *cook_name, const char *cook_value, + const char *domain, const char *path); +int cookie_del(t_cookie * cookie, const char *cook_name, const char *domain, const char *path); int cookie_load(t_cookie * cookie, const char *path, const char *name); -int cookie_save(t_cookie * cookie, char *name); -void cookie_insert(char *s, char *ins); -void cookie_delete(char *s, int pos); -char *cookie_get(char *buffer, char *cookie_base, int param); -char *cookie_find(char *s, char *cook_name, char *domain, char *path); +int cookie_save(t_cookie * cookie, const char *name); +void cookie_insert(char *s, const char *ins); +void cookie_delete(char *s, size_t pos); +const char *cookie_get(char *buffer, const char *cookie_base, int param); +char *cookie_find(char *s, const char *cook_name, const char *domain, const char *path); char *cookie_nextfield(char *a); // basic auth -int bauth_add(t_cookie * cookie, char *adr, char *fil, char *auth); -char *bauth_check(t_cookie * cookie, char *adr, char *fil); -char *bauth_prefix(char *buffer, char *adr, char *fil); +int bauth_add(t_cookie * cookie, const char *adr, const char *fil, const char *auth); +char *bauth_check(t_cookie * cookie, const char *adr, const char *fil); +char *bauth_prefix(char *buffer, const char *adr, const char *fil); #endif |