remove unnecessary args in log_trace calls

ensure we shift a char after copying next command from input buffer
This commit is contained in:
onyx-and-iris 2024-06-28 01:23:40 +01:00
parent 3c46b3d9f3
commit 161b1061c4
2 changed files with 7 additions and 7 deletions

View File

@ -92,13 +92,13 @@ bool is_pdirty(T_VBVMR_INTERFACE *vmr)
long get_parameter_float(T_VBVMR_INTERFACE *vmr, char *param, float *f)
{
log_trace("VBVMR_GetParameterFloat(%s, <float> *f)", param, f);
log_trace("VBVMR_GetParameterFloat(%s, <float> *f)", param);
return vmr->VBVMR_GetParameterFloat(param, f);
}
long get_parameter_string(T_VBVMR_INTERFACE *vmr, char *param, unsigned short *s)
{
log_trace("VBVMR_GetParameterStringW(%s, <unsigned short> *s)", param, s);
log_trace("VBVMR_GetParameterStringW(%s, <unsigned short> *s)", param);
return vmr->VBVMR_GetParameterStringW(param, s);
}

View File

@ -171,9 +171,8 @@ int init_voicemeeter(T_VBVMR_INTERFACE *vmr, int kind)
void interactive(T_VBVMR_INTERFACE *vmr)
{
char input[MAX_LINE];
char input[MAX_LINE], command[MAX_LINE];
char *p = input;
char command[MAX_LINE];
int i;
size_t len;
@ -199,14 +198,15 @@ void interactive(T_VBVMR_INTERFACE *vmr)
while (!isspace(*p))
command[i++] = *p++;
command[i] = '\0';
p++; /* shift to next char */
if (command[0] != '\0')
parse_command(vmr, command);
memset(command, '\0', sizeof(command));
memset(command, '\0', MAX_LINE);
}
p = input; /* reset pointer */
memset(input, '\0', sizeof(input)); /* reset input buffer */
p = input; /* reset pointer */
memset(input, '\0', MAX_LINE); /* reset input buffer */
printf(">> ");
}
}