gbranden pushed a commit to branch master
in repository groff.
commit 26a4aafadf67e7f62e5210cfba099dd50aa611e8
Author: G. Branden Robinson <[email protected]>
AuthorDate: Thu Nov 27 00:57:08 2025 -0600
src/roff/troff/input.cpp: Fix code style nit.
* src/roff/troff/input.cpp (read_size): Compare integer-valued variable
to integer literal instead of letting it pun down to a Boolean.
---
ChangeLog | 6 ++++++
src/roff/troff/input.cpp | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 03bbda100..d916db7a1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2025-11-27 G. Branden Robinson <[email protected]>
+
+ * src/roff/troff/input.cpp (read_size): Fix code style nit;
+ compare integer-valued variable to integer literal instead of
+ letting it pun down to a Boolean.
+
2025-11-26 G. Branden Robinson <[email protected]>
* src/roff/troff/input.cpp (do_get_long_name, read_size):
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index ef1db1d60..5bac0a5fe 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -6097,7 +6097,7 @@ static bool read_size(int *x) // \s
token start(tok);
tok.next();
c = tok.ch();
- if (!inc && ((c == '-') || (c == '+'))) {
+ if ((inc == 0) && ((c == '-') || (c == '+'))) {
inc = (c == '+') ? 1 : -1;
tok.next();
}
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit