mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-03 07:50:31 +01:00
checkpatch: check against using "unsigned int" and "$INT_TYPE unsigned|signed"
Don't use the integer type before signed/unsigned, but the
other way around. That is,
unsigned long var;
instead of
long unsigned var;
Also, just use "unsigned" instead of "unsigned int".
This commit is contained in:
parent
a9d81031f4
commit
24082ad09e
1 changed files with 2 additions and 0 deletions
|
|
@ -121,6 +121,8 @@ next if $filename =~ /\/nm-[^\/]+-enum-types\.[ch]$/;
|
|||
complain ('Tabs are only allowed at the beginning of a line') if $line =~ /[^\t]\t/;
|
||||
complain ('Trailing whitespace') if $line =~ /[ \t]$/;
|
||||
complain ('Don\'t use glib typedefs for char/short/int/long/float/double') if $line =~ /\bg(char|short|int|long|float|double)\b/;
|
||||
complain ("Don't use \"$1 $2\" instead of \"$2 $1\"") if $line =~ /\b(char|short|int|long) +(unsigned|signed)\b/;
|
||||
complain ("Don't use \"unsigned int\" but just use \"unsigned\"") if $line =~ /\b(unsigned) +(int)\b/;
|
||||
|
||||
# Further on we process stuff without comments.
|
||||
$_ = $line;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue