maint: avoid clang static analysis issues in csplit
commit3ab87d254db5b12804d5bd49d38e63fb59c40f2b
authorPádraig Brady <P@draigBrady.com>
Sun, 28 Jul 2013 01:21:07 +0000 (28 02:21 +0100)
committerPádraig Brady <P@draigBrady.com>
Sun, 28 Jul 2013 01:31:10 +0000 (28 02:31 +0100)
tree63c14d3a558d47bb69c285969f5e95a74f3a0fab
parent012fbb63719f4a683604c4917a34d2039e38c023
maint: avoid clang static analysis issues in csplit

* src/csplit.c (find_lines): Assert that load_buffer() updates the
global buffers, thus "b" will be non NULL, thus suppressing subsequent
NULL pointer derefence warnings.
(process_regexp): Avoid a redundant assignment of the "line" pointer.
(process_line_count): Likewise.  Also reduce the "line" pointer scope.
src/csplit.c