Commit 37d77caa authored by Max Kellermann's avatar Max Kellermann

const pointers

Yet another patch which converts pointer arguments to "const".
parent 5bd55516
...@@ -101,7 +101,7 @@ void tag_print_types(int fd) ...@@ -101,7 +101,7 @@ void tag_print_types(int fd)
} }
} }
void tag_print(int fd, struct tag *tag) void tag_print(int fd, const struct tag *tag)
{ {
int i; int i;
...@@ -114,7 +114,7 @@ void tag_print(int fd, struct tag *tag) ...@@ -114,7 +114,7 @@ void tag_print(int fd, struct tag *tag)
} }
} }
struct tag *tag_ape_load(char *file) struct tag *tag_ape_load(const char *file)
{ {
struct tag *ret = NULL; struct tag *ret = NULL;
FILE *fp; FILE *fp;
...@@ -303,7 +303,7 @@ void tag_free(struct tag *tag) ...@@ -303,7 +303,7 @@ void tag_free(struct tag *tag)
free(tag); free(tag);
} }
struct tag *tag_dup(struct tag *tag) struct tag *tag_dup(const struct tag *tag)
{ {
struct tag *ret; struct tag *ret;
int i; int i;
...@@ -321,7 +321,7 @@ struct tag *tag_dup(struct tag *tag) ...@@ -321,7 +321,7 @@ struct tag *tag_dup(struct tag *tag)
return ret; return ret;
} }
int tag_equal(struct tag *tag1, struct tag *tag2) int tag_equal(const struct tag *tag1, const struct tag *tag2)
{ {
int i; int i;
......
...@@ -51,7 +51,7 @@ struct tag { ...@@ -51,7 +51,7 @@ struct tag {
mpd_uint8 numOfItems; mpd_uint8 numOfItems;
}; };
struct tag *tag_ape_load(char *file); struct tag *tag_ape_load(const char *file);
struct tag *tag_new(void); struct tag *tag_new(void);
...@@ -86,10 +86,10 @@ static inline void tag_add_item(struct tag *tag, enum tag_type itemType, ...@@ -86,10 +86,10 @@ static inline void tag_add_item(struct tag *tag, enum tag_type itemType,
void tag_print_types(int fd); void tag_print_types(int fd);
void tag_print(int fd, struct tag *tag); void tag_print(int fd, const struct tag *tag);
struct tag *tag_dup(struct tag *tag); struct tag *tag_dup(const struct tag *tag);
int tag_equal(struct tag *tag1, struct tag *tag2); int tag_equal(const struct tag *tag1, const struct tag *tag2);
#endif #endif
...@@ -338,7 +338,7 @@ static struct id3_tag *findId3TagFromEnd(FILE * stream) ...@@ -338,7 +338,7 @@ static struct id3_tag *findId3TagFromEnd(FILE * stream)
} }
#endif #endif
struct tag *tag_id3_load(char *file) struct tag *tag_id3_load(const char *file)
{ {
struct tag *ret = NULL; struct tag *ret = NULL;
#ifdef HAVE_ID3TAG #ifdef HAVE_ID3TAG
......
...@@ -28,6 +28,6 @@ struct id3_tag; ...@@ -28,6 +28,6 @@ struct id3_tag;
struct tag *tag_id3_import(struct id3_tag *); struct tag *tag_id3_import(struct id3_tag *);
#endif #endif
struct tag *tag_id3_load(char *file); struct tag *tag_id3_load(const char *file);
#endif #endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment