Mark plat_vidapi() argument as const and remove the NULL
* plat_vidapi() accepts char pointer, which never gets modifed later on. Mark it as const. * In src/config.c, va_name is initialized as NULL, however, plat_vidapi_name() never returns a NULL pointer, nor it was initialized under a condition branch. Removing NULL, might save one instruction, which requires zeroing the register before setting its initial value.
This commit is contained in:
@@ -38,7 +38,7 @@ qt_nvr_save(void)
|
||||
char icon_set[256] = ""; /* name of the iconset to be used */
|
||||
|
||||
int
|
||||
plat_vidapi(char *api)
|
||||
plat_vidapi(const char *api)
|
||||
{
|
||||
if (!strcasecmp(api, "default") || !strcasecmp(api, "system")) {
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user