Skip to content

Instantly share code, notes, and snippets.

@rjenkins
Created February 19, 2013 01:25
Show Gist options
  • Save rjenkins/4982317 to your computer and use it in GitHub Desktop.
Save rjenkins/4982317 to your computer and use it in GitHub Desktop.
char *nodes_path = malloc(snprintf(NULL, 0, "%s%s%s", "/", cluster->name, "/nodes") + 1);
sprintf(nodes_path, "%s%s%s", "/", cluster->name, "/nodes");
struct String_vector nodes;
int nodes_ret_val = zoo_wget_children(zh, nodes_path,
nodes_watcher, context, &nodes);
free(nodes_path);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment