summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKirill A. Shutemov <kirill@shutemov.name>2011-07-15 15:07:59 +0300
committerVicent Marti <tanoku@gmail.com>2011-07-25 21:12:46 +0200
commitb42a7f01a5114bd0e92d1e3c7c37ffbd4f8702ff (patch)
treed6d30627fe5296364d906f36f1730c7cad55f565 /src
parent14468c6be59567bf9d90ff21bd62893409ec82df (diff)
downloadlibgit2-b42a7f01a5114bd0e92d1e3c7c37ffbd4f8702ff.tar.gz
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>
Diffstat (limited to 'src')
-rw-r--r--src/reflog.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/reflog.c b/src/reflog.c
index da61fd7d6..c90abb20f 100644
--- a/src/reflog.c
+++ b/src/reflog.c
@@ -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;