[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v3 21/25] tools/xenstore: introduce read_node_nocopy()
On 02.08.23 00:00, Julien Grall wrote: Hi Juergen,Title: I can't find read_node_nocopy(). I found a read_node_const(). Which name did you intend to use? Oh, sorry for that. I think read_node_const() is the better choice. On 24/07/2023 12:02, Juergen Gross wrote:+static int read_node_helper(struct connection *conn, struct node *node) +{ /* Data is binary blob (usually ascii, no nul). */ - node->data = node->perms + hdr->num_perms; + node->data = node->perms + node->hdr.num_perms; /* Children is strings, nul separated. */ node->children = node->data + node->hdr.datalen; if (domain_adjust_node_perms(node)) - goto error; + return -1;You are either returning 0 or -1 which is then only used in if ( ... ). Can we simply return a boolean (true for success, false for a failure)? Fine with me. The rest LGTM. Thanks, Juergen Attachment:
OpenPGP_0xB0DE9DD628BF132F.asc Attachment:
OpenPGP_signature
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |