Subject: [quicwg/base-drafts] Parenthesize 2 * MaxEntries to prevent naive errors (#1856)

From: Dmitri Tikhonov <[email-masked]>
Date: Fri, 12 Oct 2018 12:11:17 -0700

Transcribing

```
  LargestReference mod 2*MaxEntries + 1
```

to C one of its offspring without parentheses around 2 * MaxEntries
will produce an incorrect result.
You can view, comment on, or merge this pull request online at:

  https://github.com/quicwg/base-drafts/pull/1856

-- Commit Summary --

  * Parenthesize 2 * MaxEntries to prevent naive errors

-- File Changes --

    M draft-ietf-quic-qpack.md (4)

-- Patch Links --

https://github.com/quicwg/base-drafts/pull/1856.patch
https://github.com/quicwg/base-drafts/pull/1856.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/1856

---

From: Dmitri Tikhonov <[email-masked]>
Date: Fri, 12 Oct 2018 12:17:30 -0700

@dtikhonov pushed 1 commit.

8f769aa  Fix lint error (figure too wide) via creative variable renaming

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/1856/files/e5bdb8829ed867c8b4db42cb6d3bc94c786d511b..8f769aab13ba759dd523e06881478b5e39ff3f14

---

From: Martin Thomson <[email-masked]>
Date: Sun, 14 Oct 2018 19:06:17 -0700

martinthomson commented on this pull request.

> @@ -718,15 +718,15 @@ safe to process the rest of the block.  If Largest Reference is greater than
 zero, the encoder transforms it as follows before encoding:
 
 ~~~
-   LargestReference = LargestReference mod 2*MaxEntries + 1
+   LargestReference = LargestReference mod (2*MaxEntries) + 1

Do you mean `LR % ((2*ME)+1)` or `(LR % (2*ME))+1`?  I think the latter, but I think that it's probably best to double-down on the parentheses here.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/1856#pullrequestreview-164531266

---

From: Dmitri Tikhonov <[email-masked]>
Date: Mon, 15 Oct 2018 05:13:36 -0700

dtikhonov commented on this pull request.

 ~~~

I mean the latter.  I can add more parentheses.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/1856#discussion_r225141439

---

From: Dmitri Tikhonov <[email-masked]>
Date: Mon, 15 Oct 2018 05:18:04 -0700

a85d15f  Add parentheses to disambiguate further; prettify other spots

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/1856/files/8f769aab13ba759dd523e06881478b5e39ff3f14..a85d15f00e0f998fc5e9f4ad82a1347859ddf3af

---

From: Martin Thomson <[email-masked]>
Date: Thu, 18 Oct 2018 19:06:37 -0700

martinthomson approved this pull request.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/1856#pullrequestreview-166358849

---

From: afrind <[email-masked]>
Date: Tue, 23 Oct 2018 08:27:12 -0700

Merged #1856 into master.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/1856#event-1920834939