Print this page
6139 help gcc figure out variable initialization

*** 461,477 **** if ((node->hp_type == HP_NODE_CONNECTOR) || (node->hp_type == HP_NODE_PORT)) (void) strlcpy(connection, node->hp_name, MAXPATHLEN); /* Trace back to the root node, accumulating components */ ! for (parent = node; parent != NULL; parent = parent->hp_parent) { if (parent->hp_type == HP_NODE_DEVICE) { (void) strlcat(components, "/", MAXPATHLEN); (void) strlcat(components, parent->hp_name, MAXPATHLEN); } - if (parent->hp_parent == NULL) - root = parent; } /* Ensure the snapshot actually contains a base path */ if (root->hp_basepath == NULL) { i_hp_dprintf("hp_path: missing base pathname.\n"); --- 461,476 ---- if ((node->hp_type == HP_NODE_CONNECTOR) || (node->hp_type == HP_NODE_PORT)) (void) strlcpy(connection, node->hp_name, MAXPATHLEN); /* Trace back to the root node, accumulating components */ ! for (parent = node, root = parent; parent != NULL; ! root = parent, parent = parent->hp_parent) { if (parent->hp_type == HP_NODE_DEVICE) { (void) strlcat(components, "/", MAXPATHLEN); (void) strlcat(components, parent->hp_name, MAXPATHLEN); } } /* Ensure the snapshot actually contains a base path */ if (root->hp_basepath == NULL) { i_hp_dprintf("hp_path: missing base pathname.\n");