minor improve

This commit is contained in:
Rongsong Shen 2026-04-14 12:52:40 +08:00
parent 897ca481b6
commit c1c9f9e736
4 changed files with 5 additions and 7 deletions

View file

@ -308,7 +308,6 @@ int build_vres_name(char** vname, xce_limit_t* limit, char* user, char* queue,
size_t bufsize = 0; size_t bufsize = 0;
FILE* fp = NULL; FILE* fp = NULL;
xce_consumer_t* c = NULL; xce_consumer_t* c = NULL;
int rc = 0;
*vname = NULL; *vname = NULL;
if ((vname == NULL) || (limit == NULL) || (user == NULL) || (queue == NULL) if ((vname == NULL) || (limit == NULL) || (user == NULL) || (queue == NULL)
@ -339,8 +338,6 @@ int build_vres_name(char** vname, xce_limit_t* limit, char* user, char* queue,
fprintf(fp, "/p=%s", project); fprintf(fp, "/p=%s", project);
} }
fflush(fp);
fclose(fp); fclose(fp);
if ((*vname) != NULL) { if ((*vname) != NULL) {

View file

@ -476,7 +476,8 @@ static int sched_init_resources(xce_scheduler_t* sched)
r1 = makeResource(sched->resmgr, r); r1 = makeResource(sched->resmgr, r);
if (r1 == NULL) { if (r1 == NULL) {
ERROR("%s add resource %s failed", __func__, r->name); ERROR("%s add resource %s failed", __func__,
r->name ? r->name : "(null)");
} }
} }
return 0; return 0;