Source-Changes archive

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

CVS commit: src/usr.bin/indent



Module Name:    src
Committed By:   rillig
Date:           Sun Mar 14 01:44:37 UTC 2021

Modified Files:
        src/usr.bin/indent: io.c

Log Message:
indent: make compute_code_indent more readable

The '?:' operator computing the factor was too hard to read.  When
quickly scanning the code, the 1 in the expression looked too much like
it would be added to the indentation, which would turn the indentation
length into a column number, and that again would smell like an
off-by-one error.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/usr.bin/indent/io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index