Skip to content

Commit

Permalink
STY: Use TABLE_ENTRY for the max length of the KPP names
Browse files Browse the repository at this point in the history
I think there's a way to pass this as a parameter to snprintf instead, but I don't remember what that is at the moment.
  • Loading branch information
DWesl authored Jan 25, 2024
1 parent 35dfa23 commit 47e8e94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/gen_irr_diag.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,9 @@ int irr_diag_scalar_indices( char *dirname )
sprintf( line," chm_opts_ndx(:nchm_opts) = (/ ");
for( i = 0; i < nChmOpts; i++ ) {
if( i == 0 )
snprintf( piece,135,"%.128s_kpp",chm_scheme[i]);
snprintf( piece,TABLE_ENTRY+EXTRA_FOR_DEST_BUFFER,"%." #TABLE_ENTRY "s_kpp",chm_scheme[i]);
else
snprintf( piece,135," ,%.128s_kpp",chm_scheme[i]);
snprintf( piece,TABLE_ENTRY+EXTRA_FOR_DEST_BUFFER," ,%." #TABLE_ENTRY "s_kpp",chm_scheme[i]);
strcat( line,piece );
}
strcat( line," /)\n" );
Expand Down

0 comments on commit 47e8e94

Please sign in to comment.