Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Mar 11, 2019
1 parent 0ac12de commit e73bb95
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/clib/pio.h
Original file line number Diff line number Diff line change
Expand Up @@ -573,8 +573,7 @@ typedef struct file_desc_t
/** PIO data type. */
int pio_type;

/** Pointer to the next file_desc_t in the list of open files. */
// struct file_desc_t *next;
/* hash table entry */
UT_hash_handle hh;

/** True if this task should participate in IO (only true for one
Expand Down
8 changes: 6 additions & 2 deletions src/clib/pio_lists.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ int pio_get_file(int ncid, file_desc_t **cfile1)
*/
int pio_delete_file_from_list(int ncid)
{
file_desc_t *cfile, *pfile = NULL;
file_desc_t *cfile = NULL;
int ret;

/* Find the file pointer. */
Expand Down Expand Up @@ -263,8 +263,10 @@ io_desc_t *pio_get_iodesc_from_id(int ioid)
if (current_iodesc && current_iodesc->ioid == ioid)
ciodesc = current_iodesc;
else
{
HASH_FIND_INT(pio_iodesc_list, &ioid, ciodesc);

current_iodesc = ciodesc;
}
return ciodesc;
}

Expand All @@ -283,6 +285,8 @@ int pio_delete_iodesc_from_list(int ioid)
if(ciodesc)
{
HASH_DEL(pio_iodesc_list, ciodesc);
if (current_iodesc = ciodesc)
current_iodesc = pio_iodesc_list;
free(ciodesc);
return PIO_NOERR;
}
Expand Down

0 comments on commit e73bb95

Please sign in to comment.