qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] util/envlist: Fix 2 bugs in envlist_setenv and


From: no-reply
Subject: Re: [Qemu-devel] [PATCH] util/envlist: Fix 2 bugs in envlist_setenv and envlist_unsetenv
Date: Sun, 22 Jan 2017 01:06:10 -0800 (PST)

Hi,

Your series seems to have some coding style problems. See output below for
more information:

Subject: [Qemu-devel] [PATCH] util/envlist: Fix 2 bugs in envlist_setenv and 
envlist_unsetenv
Message-id: address@hidden
Type: series

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

# Useful git options
git config --local diff.renamelimit 0
git config --local diff.renames True

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
3d0c260 util/envlist: Fix 2 bugs in envlist_setenv and envlist_unsetenv

=== OUTPUT BEGIN ===
Checking PATCH 1/1: util/envlist: Fix 2 bugs in envlist_setenv and 
envlist_unsetenv...
ERROR: code indent should never use tabs
#29: FILE: util/envlist.c:133:
+^Istruct envlist_entry *entry = NULL, *entry_old = NULL;$

ERROR: code indent should never use tabs
#40: FILE: util/envlist.c:150:
+^Ifor (entry_old = envlist->el_entries.lh_first; entry_old != NULL;$

ERROR: code indent should never use tabs
#41: FILE: util/envlist.c:151:
+^I    entry_old = entry_old->ev_link.le_next) {$

ERROR: code indent should never use tabs
#42: FILE: util/envlist.c:152:
+^I^Iif (strncmp(entry_old->ev_var, env, envname_len) == 0)$

ERROR: braces {} are necessary for all arms of this statement
#42: FILE: util/envlist.c:152:
+               if (strncmp(entry_old->ev_var, env, envname_len) == 0)
[...]

ERROR: code indent should never use tabs
#61: FILE: util/envlist.c:163:
+^Iif (entry_old != NULL) {$

ERROR: code indent should never use tabs
#62: FILE: util/envlist.c:164:
+^I^IQLIST_REMOVE(entry_old, ev_link);$

ERROR: code indent should never use tabs
#63: FILE: util/envlist.c:165:
+^I^Ifree((char *)entry_old->ev_var);$

ERROR: code indent should never use tabs
#64: FILE: util/envlist.c:166:
+^I^Ifree(entry_old);$

ERROR: code indent should never use tabs
#65: FILE: util/envlist.c:167:
+^I} else {$

ERROR: code indent should never use tabs
#66: FILE: util/envlist.c:168:
+^I^Ienvlist->el_count++;$

ERROR: code indent should never use tabs
#67: FILE: util/envlist.c:169:
+^I}$

ERROR: code indent should never use tabs
#76: FILE: util/envlist.c:189:
+^Ienvname_len = strlen(env);$

ERROR: code indent should never use tabs
#77: FILE: util/envlist.c:190:
+^Iif(0 == envname_len)$

ERROR: space required before the open parenthesis '('
#77: FILE: util/envlist.c:190:
+       if(0 == envname_len)

ERROR: braces {} are necessary for all arms of this statement
#77: FILE: util/envlist.c:190:
+       if(0 == envname_len)
[...]

ERROR: code indent should never use tabs
#78: FILE: util/envlist.c:191:
+^I^Ireturn (EINVAL);$

ERROR: return is not a function, parentheses are not required
#78: FILE: util/envlist.c:191:
+               return (EINVAL);

total: 18 errors, 0 warnings, 63 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]