Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Steven Roberts <[email protected]>
  • Loading branch information
drreynolds and Steven-Roberts authored Feb 25, 2025
1 parent 4ee0ced commit 7fe32c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/arkode/arkode.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ typedef enum

/* Command-line control over ARKODE options */
SUNDIALS_EXPORT int ARKodeSetFromCommandLine(void* arkode_mem, int argc,
char* argv[]);
const char* argv[]);

/* Resize and Reset functions */
SUNDIALS_EXPORT int ARKodeResize(void* arkode_mem, N_Vector ynew,
Expand Down
5 changes: 3 additions & 2 deletions src/arkode/arkode_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@ int ARKodeSetFromCommandLine(void* arkode_mem, int argc, char* argv[])
sunbooleantype arg_used = SUNFALSE;

/* skip command-line arguments that do not begin with "arkode." */
if (strncmp(argv[i], "arkode.", 7) != 0) { continue; }
static const char *prefix = "arkode.";
if (strncmp(argv[i], prefix, strlen(prefix)) != 0) { continue; }

/* check all "int" command-line options */
for (j = 0; j < num_int_keys; j++)
Expand Down Expand Up @@ -281,7 +282,7 @@ int ARKodeSetFromCommandLine(void* arkode_mem, int argc, char* argv[])
if (strcmp(argv[i], "arkode.interpolant_type") == 0)
{
i++;
retval = 1;
retval = ARK_ILL_INPUT;
if (strcmp(argv[i], "ARK_INTERP_HERMITE") == 0)
{
retval = ARKodeSetInterpolantType(arkode_mem, ARK_INTERP_HERMITE);
Expand Down

0 comments on commit 7fe32c7

Please sign in to comment.