« Previous | Next » 

Revision 5f070c5f

ID5f070c5fb768cc587b1a75379b7b17c3f841fd40

Added by Avi Kivity over 12 years ago

CODING_STYLE: explicitly allow braceless 'else if'

It's already allowed by the example; there are about 1800 instances in the
tree; and disallowing it would lead to

if (a) {
...
} else {
if (b) {
...
} else {
if (c) {
...
} else {
if (d) {
...
} else {
...
}
}
}
}

instead of

if (a) {
...
} else if (b) {
...
} else if (c) {
...
} else if (d) {
...
} else {
...
}

which is more readable.

Acked-by: Blue Swirl <>
Signed-off-by: Avi Kivity <>
Signed-off-by: Anthony Liguori <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences