Skip to content
  • Olivier Fourdan's avatar
    dix: cache ResourceClientBits() value · c7311654
    Olivier Fourdan authored and Adam Jackson's avatar Adam Jackson committed
    
    
    The `LimitClient` is set once and for all at startup, whereas the
    function `ResourceClientBits()` which returns the client field offset
    within the XID based on the value of `LimitClient` can be called
    repeatedly.
    
    Small optimization, cache the result of `ilog2()`, that saves running
    the same loop over and over each time `ResourceClientBits()` is called.
    
    Signed-off-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
    c7311654