diff --git a/synapse/handlers/room_list.py b/synapse/handlers/room_list.py
index ec0a293a376f89f640f97d37dcaabe41870c6164..f15987b265dd09a0db4ffb0bbaf03138a38359f0 100644
--- a/synapse/handlers/room_list.py
+++ b/synapse/handlers/room_list.py
@@ -220,6 +220,8 @@ class RoomListHandler(BaseHandler):
 
         chunk.sort(key=lambda e: (-e["num_joined_members"], e["room_id"]))
 
+        # Work out the new limit of the batch for pagination, or None if we
+        # know there are no more results that would be returned.
         new_limit = None
         if chunk and (not limit or len(chunk) > limit):
             if limit: