Skip to content
Snippets Groups Projects

Consolidation with CDI-PIO (develop)

Merged Sergey Kosukhin requested to merge m300488/develop-rebase into develop
1 file
+ 2
8
Compare changes
  • Side-by-side
  • Inline
+ 2
8
@@ -13,7 +13,6 @@
typedef struct
{
int self;
int used;
int center;
int subcenter;
char *name;
@@ -38,7 +37,6 @@ static void
instituteDefaultValue(institute_t *instituteptr)
{
instituteptr->self = CDI_UNDEFID;
instituteptr->used = 0;
instituteptr->center = CDI_UNDEFID;
instituteptr->subcenter = CDI_UNDEFID;
instituteptr->name = NULL;
@@ -121,7 +119,7 @@ findInstitute(int id, void *res, void *data)
{
institute_t *ip1 = ((struct instLoc *) data)->ip;
institute_t *ip2 = (institute_t *) res;
if (ip2->used && !instituteCompareKernel(ip1, ip2))
if (!instituteCompareKernel(ip1, ip2))
{
((struct instLoc *) data)->id = id;
return CDI_APPLY_STOP;
@@ -135,7 +133,6 @@ institutInq(int center, int subcenter, const char *name, const char *longname)
{
institute_t ip_ref;
ip_ref.self = CDI_UNDEFID;
ip_ref.used = 0;
ip_ref.center = center;
ip_ref.subcenter = subcenter;
ip_ref.name = (name && name[0]) ? (char *) name : NULL;
@@ -159,7 +156,6 @@ instituteNewEntry(cdiResH resH, int center, int subcenter, const char *name, con
instituteptr->self = resH;
reshReplace(resH, instituteptr, &instituteOps);
}
instituteptr->used = 1;
instituteptr->center = center;
instituteptr->subcenter = subcenter;
if (name && *name) instituteptr->name = strdupx(name);
@@ -242,13 +238,11 @@ institutePrintP(institute_t *ip, FILE *fp)
"# instituteID %d\n"
"#\n"
"self = %d\n"
"used = %d\n"
"center = %d\n"
"subcenter = %d\n"
"name = %s\n"
"longname = %s\n",
ip->self, ip->self, ip->used, ip->center, ip->subcenter, ip->name ? ip->name : "NN",
ip->longname ? ip->longname : "NN");
ip->self, ip->self, ip->center, ip->subcenter, ip->name ? ip->name : "NN", ip->longname ? ip->longname : "NN");
}
static int
Loading