gbranden pushed a commit to branch master
in repository groff.

commit 086b87ce5a2180824f20e5dfc94103369e18fa9c
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sun Mar 22 18:54:53 2026 -0500

    src/roff/troff/input.cpp: Fix code style nit.
    
    * src/roff/troff/input.cpp (char_list::set, char_list::get):
      Parenthesize formally complex expressions.
---
 ChangeLog                | 5 +++++
 src/roff/troff/input.cpp | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index e4dc59b04..415174df1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2026-03-22  G. Branden Robinson <[email protected]>
+
+       * src/roff/troff/input.cpp (char_list::set, char_list::get):
+       Fix code style nit.  Parenthesize formally complex expressions.
+
 2026-03-22  G. Branden Robinson <[email protected]>
 
        * src/roff/troff/input.cpp (class char_list): Rename member
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 0664e3182..f859bb569 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -3882,7 +3882,7 @@ void char_list::set(unsigned char c, int offset)
 {
   assert(length > offset);
   // optimization for access at the end
-  int boundary = length - length % char_block::SIZE;
+  int boundary = length - (length % char_block::SIZE);
   if (offset >= boundary) {
     *(tail->s + offset - boundary) = c;
     return;
@@ -3903,7 +3903,7 @@ unsigned char char_list::get(int offset)
 {
   assert(length > offset);
   // optimization for access at the end
-  int boundary = length - length % char_block::SIZE;
+  int boundary = length - (length % char_block::SIZE);
   if (offset >= boundary)
     return *(tail->s + offset - boundary);
   char_block *tem = head;

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to