gbranden pushed a commit to branch master
in repository groff.
commit 502b648e4c0eb3d796edcfc96f34273d981b4b85
Author: G. Branden Robinson <[email protected]>
AuthorDate: Tue Nov 10 13:39:34 2026 -0600
src/preproc/tbl/main.cpp: Fix code style nit.
* src/preproc/tbl/main.cpp (process_data): Arrange equality comparison
to avoid inadvertent assignment to lvalue.
Also annotate null pointer literal with `nullptr` comment to ease any
future transition to C++11, which defines it as a keyword.
---
ChangeLog | 6 ++++++
src/preproc/tbl/main.cpp | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index c2c4a21b2..9ef73713e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2026-11-10 G. Branden Robinson <[email protected]>
+
+ * src/preproc/tbl/main.cpp (process_data): Fix code style nit.
+ Arrange equality comparison to avoid inadvertent assignment to
+ lvalue.
+
2026-11-09 G. Branden Robinson <[email protected]>
* src/preproc/tbl/main.cpp (process_format): Stop deleting the
diff --git a/src/preproc/tbl/main.cpp b/src/preproc/tbl/main.cpp
index e66fad189..0521afb4f 100644
--- a/src/preproc/tbl/main.cpp
+++ b/src/preproc/tbl/main.cpp
@@ -1619,7 +1619,7 @@ static table *process_data(table_input &in, format *f,
options *opt)
if (line.length() >= 4
&& line[0] == '.' && line[1] == 'T' && line[2] == '&') {
format *newf = process_format(in, opt, f);
- if (newf == 0)
+ if (0 /* nullptr */ == newf)
give_up = true;
else
f = newf;
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit