Make parameters for command_is_mandatory const

The parameters can be const as they aren't modified.
This commit is contained in:
Markus Mäkelä 2017-01-31 10:16:33 +02:00
parent 82105d20e1
commit 00f16e1fa5

View File

@ -2174,11 +2174,9 @@ USER* find_user_data(HASHTABLE *hash, const char *name, const char *remote)
return user;
}
static bool command_is_mandatory(GWBUF *buffer)
static bool command_is_mandatory(const GWBUF *buffer)
{
uint8_t cmd = *(((uint8_t*)GWBUF_DATA(buffer)) + 4);
switch (cmd)
switch (MYSQL_GET_COMMAND((uint8_t*)GWBUF_DATA(buffer)))
{
case MYSQL_COM_QUIT:
case MYSQL_COM_PING: