示例#1
0
nodeset_t *nodeset_create_string (const char *s)
{
    nodeset_t *n = nodeset_create ();
    if (!nodeset_add_string (n, s)) {
        nodeset_destroy (n);
        return NULL;
    }
    return n;
}
示例#2
0
文件: nodeset.c 项目: trws/flux-core
/* Use nsv[0] to build intersection.
 * (The returned nodeset is from nsv - didn't bother to copy)
 */
static nodeset_t *nsv_union (int nsc, nodeset_t **nsv)
{
    int i;
    if (nsc < 1)
        return NULL;
    for (i = 1; i < nsc; i++) {
        if (!nodeset_add_string (nsv[0], nodeset_string (nsv[i])))
            return NULL;
    }
    return nsv[0];
}