#define LNET_RESERVED_PORTAL 0
/** wildcard NID that matches any end-point address */
-#define LNET_NID_ANY ((lnet_nid_t) -1)
+#define LNET_NID_ANY (~(lnet_nid_t) 0)
/** wildcard PID that matches any lnet_pid_t */
-#define LNET_PID_ANY ((lnet_pid_t) -1)
+#define LNET_PID_ANY (~(lnet_pid_t) 0)
static inline int LNET_NID_IS_ANY(const struct lnet_nid *nid)
{
char *entity, char *err_str,
struct cYAML **root)
{
- struct cYAML *r = NULL, *err, *s, *itm, *cmd_obj;
+ struct cYAML *r = NULL, *err, *s, *itm = NULL, *cmd_obj;
if (root == NULL)
return;
else if (cmd_obj == NULL) {
s = cYAML_create_seq(r, cmd);
itm = cYAML_create_seq_item(s);
- } else if (cmd_obj != NULL && cmd_obj->cy_type != CYAML_TYPE_ARRAY)
+ } else if (cmd_obj != NULL && cmd_obj->cy_type != CYAML_TYPE_ARRAY) {
goto failed;
+ }
err = cYAML_create_object(itm, entity);
if (err == NULL)
/* assign the network id */
ip2nets.ip2nets_net.nw_id = libcfs_str2net(net->cy_valuestring);
- if (ip2nets.ip2nets_net.nw_id == LNET_NID_ANY)
+ if (ip2nets.ip2nets_net.nw_id == LNET_NET_ANY)
return LUSTRE_CFG_RC_BAD_PARAM;
seq_no = cYAML_get_object_item(tree, "seq_no");