From 6dcd18bb884e7f990427bce388cc29c5b2a164f4 Mon Sep 17 00:00:00 2001 From: Ian Denhardt Date: Sun, 23 Oct 2022 21:09:28 -0400 Subject: [PATCH] Clarify a comment Per #306, the call sites where this is unused struck me as suspicious -- but they are actually fine; sendCap already takes care of incrementing where necessary. The return value only needed by sendReturn, so that it can arrange to release these when it receives a finish message with releaseParamCaps = true. This patch clarifies the comment to make it clear that the caller is not responsible for actually applying the refcounts. --- rpc/export.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpc/export.go b/rpc/export.go index d3867f37..155c44cd 100644 --- a/rpc/export.go +++ b/rpc/export.go @@ -173,7 +173,7 @@ func (c *Conn) sendCap(d rpccp.CapDescriptor, client capnp.Client) (_ exportID, // fillPayloadCapTable adds descriptors of payload's message's // capabilities into payload's capability table and returns the -// reference counts added to the exports table. +// reference counts that have been added to the exports table. // // The caller must be holding onto c.mu. func (c *Conn) fillPayloadCapTable(payload rpccp.Payload, clients []capnp.Client) (map[exportID]uint32, error) {