1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[auth] const in add_auth_entry

This commit is contained in:
Witold Filipczyk 2022-02-17 20:33:16 +01:00
parent dbe9cd5fe3
commit e8ad0b5948
2 changed files with 4 additions and 4 deletions

View File

@ -33,7 +33,7 @@ static INIT_LIST_OF(struct auth_entry, auth_entry_list);
* NULL, it returns the first record found. If realm isn't NULL, it returns * NULL, it returns the first record found. If realm isn't NULL, it returns
* the first record that matches exactly (url and realm) if any. */ * the first record that matches exactly (url and realm) if any. */
static struct auth_entry * static struct auth_entry *
find_auth_entry(struct uri *uri, char *realm) find_auth_entry(struct uri *uri, const char *realm)
{ {
struct auth_entry *match = NULL, *entry; struct auth_entry *match = NULL, *entry;
@ -92,7 +92,7 @@ set_auth_password(struct auth_entry *entry, struct uri *uri)
static void done_auth_entry(struct auth_entry *entry); static void done_auth_entry(struct auth_entry *entry);
static struct auth_entry * static struct auth_entry *
init_auth_entry(struct uri *uri, char *realm) init_auth_entry(struct uri *uri, const char *realm)
{ {
struct auth_entry *entry; struct auth_entry *entry;
@ -132,7 +132,7 @@ init_auth_entry(struct uri *uri, char *realm)
/* Returns the new entry or updates an existing one. Sets the @valid member if /* Returns the new entry or updates an existing one. Sets the @valid member if
* updating is required so it can be tested if the user should be queried. */ * updating is required so it can be tested if the user should be queried. */
struct auth_entry * struct auth_entry *
add_auth_entry(struct uri *uri, char *realm, char *nonce, add_auth_entry(struct uri *uri, const char *realm, char *nonce,
char *opaque, unsigned int digest) char *opaque, unsigned int digest)
{ {
struct auth_entry *entry; struct auth_entry *entry;

View File

@ -42,7 +42,7 @@ struct auth_entry {
(*(_entry_)->user || *(_entry_)->password) (*(_entry_)->user || *(_entry_)->password)
struct auth_entry *find_auth(struct uri *); struct auth_entry *find_auth(struct uri *);
struct auth_entry *add_auth_entry(struct uri *, char *, struct auth_entry *add_auth_entry(struct uri *, const char *,
char *, char *, unsigned int); char *, char *, unsigned int);
void del_auth_entry(struct auth_entry *); void del_auth_entry(struct auth_entry *);
void free_auth(void); void free_auth(void);