diff --git a/examples/lib/lib_synth_shed/synth_shed.c b/examples/lib/lib_synth_shed/synth_shed.c index 1fa5760..6dc2b7c 100644 --- a/examples/lib/lib_synth_shed/synth_shed.c +++ b/examples/lib/lib_synth_shed/synth_shed.c @@ -46,13 +46,12 @@ SYNTH_STATUS synth_create(synth_t **new_synth, const char *brand, const char *mo SYNTH_STATUS synth_set_osc_count(synth_t *synth, int osc_count) { assert(synth); - SYNTH_STATUS status = 0; if (osc_count < 0) { - status = 1; + return SYNTH_STATUS_ARG_ERR; } else { synth->osc_count = osc_count; } - return status; + return SYNTH_STATUS_OK; } @@ -87,9 +86,9 @@ const char *tech_to_string(const enum _tech *tech) { } -SYNTH_STATUS filtertype_to_string(const filtertype_t *const filt, char **ftstr) { +SYNTH_STATUS filtertype_to_string(const filtertype_t *const filt,const char **ftstr) { assert(filt); - char *_ftstr = "unknown filtertype"; + const char *_ftstr = "unknown filtertype"; if (filt == NULL) { return SYNTH_STATUS_ARG_ERR; } @@ -126,7 +125,7 @@ const char *play_synth(synth_t *synth) { const char *filtertype_str[3] = {"", "", ""}; for (int i = 0; i < 3; i++) { - filt_tech[i] = tech_to_string(&synth->filter[i].technology); + (filt_tech[i]) = tech_to_string(&synth->filter[i].technology); SYNTH_STATUS status = filtertype_to_string(&synth->filter[i].type, &filtertype_str[i]); if (status != SYNTH_STATUS_OK) { diff --git a/examples/lib/lib_synth_shed/synth_shed.h b/examples/lib/lib_synth_shed/synth_shed.h index 1033bd5..17820c3 100644 --- a/examples/lib/lib_synth_shed/synth_shed.h +++ b/examples/lib/lib_synth_shed/synth_shed.h @@ -58,7 +58,7 @@ const char* status_to_string(SYNTH_STATUS status); const char* tech_to_string(const enum _tech* tech); -SYNTH_STATUS filtertype_to_string(const filtertype_t* const filt, char** ftstr); +SYNTH_STATUS filtertype_to_string(const filtertype_t* const filt,const char** ftstr); const char* play_synth(synth_t* synth);