On Fri, 2015-12-04 at 16:08 -0800, Junio C Hamano wrote:
> David Turner <dtur...@twopensource.com> writes:
> 
> > +   while (!mdb_ret) {
> > +           if (starts_with(key.mv_data, refname) &&
> > +               ((char*)key.mv_data)[refname_len - 2] == '/') {
> 
> ERROR: "(foo*)" should be "(foo *)"
> #877: FILE: refs/lmdb-backend.c:514:
> +                   ((char*)key.mv_data)[refname_len - 2] == '/') {
> 
> > +static int show_one_reflog_ent(struct strbuf *sb, each_reflog_ent_fn fn, 
> > void *cb_data)
> > +{
> > +   unsigned char osha1[20], nsha1[20];
> > +   char *email_end, *message;
> > +   unsigned long timestamp;
> > +   int tz;
> > +
> > +   /* old (raw) new (raw) name <email> SP time TAB msg LF */
> > +   if (sb->len < 41 || sb->buf[sb->len - 1] != '\n' ||
> > +       !(email_end = strchr(sb->buf + 40, '>')) ||
> > +       email_end[1] != ' ' ||
> > +       !(timestamp = strtoul(email_end + 2, &message, 10)) ||
> > +       !message || message[0] != ' ' ||
> > +       (message[1] != '+' && message[1] != '-') ||
> > +       !isdigit(message[2]) || !isdigit(message[3]) ||
> > +       !isdigit(message[4]) || !isdigit(message[5]))
> > +           return 0; /* corrupt? */
> 
> ERROR: do not use assignment in if condition
> #1024: FILE: refs/lmdb-backend.c:661:
> +       if (sb->len < 41 || sb->buf[sb->len - 1] != '\n' ||

This code is based on code from files-backend.c.  But I can change it
anyway.

I'll also fix the rest, but wait for further review to post.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to