Module Name: src Committed By: rillig Date: Sun Jan 15 15:20:18 UTC 2023
Modified Files: src/usr.bin/xlint/xlint: xlint.c Log Message: lint: turn O(n^2) to O(n) for list of arguments to lint child processes Previously, adding an argument to the lint child processes (cpp, lint1, lint2) each time searched the list of arguments for the terminating null pointer and then reallocated the memory for storing the strings. Replace the above with a standard resizable array implementation and give it a proper name, to avoid 'char ***' in the code. The terminating null pointer in the lists is only required when passing the list to execvp. In all other cases it's not needed, so drop it. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.98 -r1.99 src/usr.bin/xlint/xlint/xlint.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.