mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-21 10:17:20 +00:00
reflog: fix cast warning
/home/kas/git/public/libgit2/src/reflog.c: In function ‘reflog_parse’: /home/kas/git/public/libgit2/src/reflog.c:148:17: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual] Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
This commit is contained in:
parent
14468c6be5
commit
b42a7f01a5
@ -145,12 +145,12 @@ static int reflog_parse(git_reflog *log, const char *buf, size_t buf_size)
|
||||
if (*buf == '\t') {
|
||||
/* We got a message. Read everything till we reach LF. */
|
||||
seek_forward(1);
|
||||
entry->msg = (char *)buf;
|
||||
ptr = buf;
|
||||
|
||||
while (*buf && *buf != '\n')
|
||||
seek_forward(1);
|
||||
|
||||
entry->msg = git__strndup(entry->msg, buf - entry->msg);
|
||||
entry->msg = git__strndup(ptr, buf - ptr);
|
||||
} else
|
||||
entry->msg = NULL;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user