Title: #89: nss: rewrite nss responder so it uses cache_req
pbrezina commented:
"""
On 12/13/2016 10:01 PM, lslebodn wrote:
*@lslebodn* commented on this pull request.
------------------------------------------------------------------------
In src/responder/nss/nss_protocol_grent.c
<
https://github.com/SSSD/sssd/pull/89#pullrequestreview-12777658>:
> + int i, j;
+
+ tmp_ctx = talloc_new(NULL);
+ if (tmp_ctx == NULL) {
+ DEBUG(SSSDBG_FATAL_FAILURE, "Out of memory!\n");
+ return ENOMEM;
+ }
+
+ members[0] = nss_get_group_members(domain, msg);
+ members[1] = nss_get_group_ghosts(domain, msg, group_name);
+
+ sss_packet_get_body(packet, &body, &body_len);
+
+ num_members = 0;
+ for (i = 0; i < sizeof(members)/sizeof(members[0]); i++) {
+ el = members[i];
it might be good have spaces around division
and from performance POV, you might store it to variable/constant
We needn't divide it every time.
I expect this to be optimized during compilation since it is constant
and can be computed during compile time.
"""
See the full comment at