Skip to content

Commit 6772d32

Browse files
committed
opal/crs: silence clang warnings introduced by coverity fixes
Signed-off-by: Nathan Hjelm <[email protected]>
1 parent bcdb2d1 commit 6772d32

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

opal/mca/crs/base/crs_base_fns.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ static int metadata_extract_next_token(FILE *file, char **token, char **value)
358358
const int max_len = 256;
359359
/* NTH: as long as max_len remains small (256 bytes) there is no need
360360
* to allocate line on the heap */
361-
char line[max_len];
361+
char line[256];
362362
int line_len = 0, value_len;
363363
char *local_value = NULL;
364364
bool end_of_line = false;
@@ -399,7 +399,7 @@ static int metadata_extract_next_token(FILE *file, char **token, char **value)
399399
return OPAL_ERROR;
400400
}
401401

402-
tmp = '\0';
402+
*tmp = '\0';
403403

404404
*token = strdup (line);
405405
local_value = strdup (tmp + 1);

0 commit comments

Comments
 (0)