Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/link.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ static void LinkTable_uninitialised_fill(LinkTable *linktbl)
*/
static LinkTable *single_LinkTable_new(const char *url)
{
char *orig_ptr = strrchr(url, '/') + 1;
const char *orig_ptr = strrchr(url, '/') + 1;
char *ptr = curl_easy_unescape(NULL, orig_ptr, 0, NULL);
LinkTable *linktbl = LinkTable_alloc(url);
Link *link = Link_new(ptr, LINK_UNINITIALISED_FILE);
Expand Down Expand Up @@ -356,7 +356,7 @@ static LinkType linkname_to_LinkType(const char *linkname)
}

/* The linkname must not contain '/' in the middle. */
char *slash = strchr(linkname, '/');
const char *slash = strchr(linkname, '/');
if (slash) {
int linkname_len = strnlen(linkname, MAX_FILENAME_LEN) - 1;
if (slash - linkname != linkname_len) {
Expand Down
2 changes: 1 addition & 1 deletion src/sonic.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ XML_parser_general(void *data, const char *elem, const char **attr)
/*
* Skip to the last '/' if it exists
*/
char *s = strrchr(attr[i + 1], '/');
const char *s = strrchr(attr[i + 1], '/');
if (s) {
strncpy(link->linkname, s + 1, MAX_FILENAME_LEN);
} else {
Expand Down
Loading