treewide: try to use const char * for string literals

This commit is contained in:
Barnabás Pőcze 2023-09-16 17:47:35 +02:00
parent fc72208fa0
commit 436787d6ba
9 changed files with 20 additions and 17 deletions

View file

@ -906,9 +906,9 @@ static void run_async_sink(struct data *data)
printf("got error %d\n", res);
}
static char *getscale(uint32_t scale)
static const char *getscale(uint32_t scale)
{
char *scale_s = NULL;
const char *scale_s = NULL;
if (scale == SPA_AUDIO_VOLUME_RAMP_LINEAR)
scale_s = LINEAR;

View file

@ -843,7 +843,7 @@ static int parse_device(struct impl *this)
nextptr = device + 3;
for (value_index = 0; ; ++value_index) {
char *value_label;
const char *value_label;
switch (value_index) {
case 0: value_label = "card"; break;

View file

@ -2399,7 +2399,7 @@ static int register_profile(struct impl *backend, const char *profile, const cha
DBusMessageIter it[4];
dbus_bool_t autoconnect;
dbus_uint16_t version, chan, features;
char *str;
const char *str;
if (!(backend->enabled_profiles & spa_bt_profile_from_uuid(uuid)))
return -ECANCELED;

View file

@ -1435,7 +1435,7 @@ static bool device_remove_device_set(struct spa_bt_device *device, const char *p
int spa_bt_format_vendor_product_id(uint16_t source_id, uint16_t vendor_id, uint16_t product_id,
char *vendor_str, int vendor_str_size, char *product_str, int product_str_size)
{
char *source_str;
const char *source_str;
switch (source_id) {
case SOURCE_ID_USB: