mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2025-01-26 22:33:29 +08:00
profiles: Remove the total silly usage of gchar and replace it with char
This commit is contained in:
parent
f07a470cd8
commit
42e7929567
@ -170,7 +170,7 @@ static int avrcp_probe(struct btd_profile *p, struct btd_device *device,
|
||||
static int a2dp_source_connect(struct btd_device *dev,
|
||||
struct btd_profile *profile)
|
||||
{
|
||||
const gchar *path = device_get_path(dev);
|
||||
const char *path = device_get_path(dev);
|
||||
struct audio_device *audio_dev;
|
||||
|
||||
DBG("path %s", path);
|
||||
@ -187,7 +187,7 @@ static int a2dp_source_connect(struct btd_device *dev,
|
||||
static int a2dp_source_disconnect(struct btd_device *dev,
|
||||
struct btd_profile *profile)
|
||||
{
|
||||
const gchar *path = device_get_path(dev);
|
||||
const char *path = device_get_path(dev);
|
||||
struct audio_device *audio_dev;
|
||||
|
||||
DBG("path %s", path);
|
||||
@ -204,7 +204,7 @@ static int a2dp_source_disconnect(struct btd_device *dev,
|
||||
static int a2dp_sink_connect(struct btd_device *dev,
|
||||
struct btd_profile *profile)
|
||||
{
|
||||
const gchar *path = device_get_path(dev);
|
||||
const char *path = device_get_path(dev);
|
||||
struct audio_device *audio_dev;
|
||||
|
||||
DBG("path %s", path);
|
||||
@ -221,7 +221,7 @@ static int a2dp_sink_connect(struct btd_device *dev,
|
||||
static int a2dp_sink_disconnect(struct btd_device *dev,
|
||||
struct btd_profile *profile)
|
||||
{
|
||||
const gchar *path = device_get_path(dev);
|
||||
const char *path = device_get_path(dev);
|
||||
struct audio_device *audio_dev;
|
||||
|
||||
DBG("path %s", path);
|
||||
@ -238,7 +238,7 @@ static int a2dp_sink_disconnect(struct btd_device *dev,
|
||||
static int avrcp_control_connect(struct btd_device *dev,
|
||||
struct btd_profile *profile)
|
||||
{
|
||||
const gchar *path = device_get_path(dev);
|
||||
const char *path = device_get_path(dev);
|
||||
struct audio_device *audio_dev;
|
||||
|
||||
DBG("path %s", path);
|
||||
@ -255,7 +255,7 @@ static int avrcp_control_connect(struct btd_device *dev,
|
||||
static int avrcp_control_disconnect(struct btd_device *dev,
|
||||
struct btd_profile *profile)
|
||||
{
|
||||
const gchar *path = device_get_path(dev);
|
||||
const char *path = device_get_path(dev);
|
||||
struct audio_device *audio_dev;
|
||||
|
||||
DBG("path %s", path);
|
||||
|
@ -63,9 +63,9 @@ struct context_data {
|
||||
};
|
||||
|
||||
static void element_start(GMarkupParseContext *context,
|
||||
const gchar *element_name,
|
||||
const gchar **attribute_names,
|
||||
const gchar **attribute_values,
|
||||
const char *element_name,
|
||||
const char **attribute_names,
|
||||
const char **attribute_values,
|
||||
gpointer user_data, GError **err)
|
||||
{
|
||||
struct context_data *ctx_data = user_data;
|
||||
|
@ -144,7 +144,7 @@ static const char * const location_enum[] = {
|
||||
"rear-dropout", "chainstay", "rear-wheel", "rear-hub"
|
||||
};
|
||||
|
||||
static const gchar *location2str(uint8_t value)
|
||||
static const char *location2str(uint8_t value)
|
||||
{
|
||||
if (value < G_N_ELEMENTS(location_enum))
|
||||
return location_enum[value];
|
||||
@ -513,7 +513,7 @@ static void update_watcher(gpointer data, gpointer user_data)
|
||||
struct watcher *w = data;
|
||||
struct measurement *m = user_data;
|
||||
struct csc *csc = m->csc;
|
||||
const gchar *path = device_get_path(csc->dev);
|
||||
const char *path = device_get_path(csc->dev);
|
||||
DBusMessageIter iter;
|
||||
DBusMessageIter dict;
|
||||
DBusMessage *msg;
|
||||
|
@ -2124,7 +2124,7 @@ static const GDBusPropertyTable health_device_properties[] = {
|
||||
static struct hdp_device *create_health_device(struct btd_device *device)
|
||||
{
|
||||
struct btd_adapter *adapter = device_get_adapter(device);
|
||||
const gchar *path = device_get_path(device);
|
||||
const char *path = device_get_path(device);
|
||||
struct hdp_device *dev;
|
||||
GSList *l;
|
||||
|
||||
|
@ -104,7 +104,7 @@ static const char * const location_enum[] = {
|
||||
"foot",
|
||||
};
|
||||
|
||||
static const gchar *location2str(uint8_t value)
|
||||
static const char *location2str(uint8_t value)
|
||||
{
|
||||
if (value < G_N_ELEMENTS(location_enum))
|
||||
return location_enum[value];
|
||||
@ -265,7 +265,7 @@ static void update_watcher(gpointer data, gpointer user_data)
|
||||
struct watcher *w = data;
|
||||
struct measurement *m = user_data;
|
||||
struct heartrate *hr = m->hr;
|
||||
const gchar *path = device_get_path(hr->dev);
|
||||
const char *path = device_get_path(hr->dev);
|
||||
DBusMessageIter iter;
|
||||
DBusMessageIter dict;
|
||||
DBusMessage *msg;
|
||||
|
@ -865,7 +865,7 @@ static void remove_device(gpointer a, gpointer b)
|
||||
|
||||
static void hog_remove(struct btd_profile *p, struct btd_device *device)
|
||||
{
|
||||
const gchar *path = device_get_path(device);
|
||||
const char *path = device_get_path(device);
|
||||
|
||||
DBG("path %s", path);
|
||||
|
||||
|
@ -47,7 +47,7 @@ static int idle_timeout = 0;
|
||||
|
||||
static void input_remove(struct btd_device *device, const char *uuid)
|
||||
{
|
||||
const gchar *path = device_get_path(device);
|
||||
const char *path = device_get_path(device);
|
||||
|
||||
DBG("path %s", path);
|
||||
|
||||
@ -57,7 +57,7 @@ static void input_remove(struct btd_device *device, const char *uuid)
|
||||
static int hid_device_probe(struct btd_profile *p, struct btd_device *device,
|
||||
GSList *uuids)
|
||||
{
|
||||
const gchar *path = device_get_path(device);
|
||||
const char *path = device_get_path(device);
|
||||
const sdp_record_t *rec = btd_device_get_record(device, uuids->data);
|
||||
|
||||
DBG("path %s", path);
|
||||
|
@ -50,7 +50,7 @@ static int fifo_open(void);
|
||||
|
||||
static gboolean read_fifo(GIOChannel *io, GIOCondition cond, gpointer user_data)
|
||||
{
|
||||
gchar buffer[12];
|
||||
char buffer[12];
|
||||
gsize offset, left, bread;
|
||||
GIOStatus iostatus;
|
||||
|
||||
|
@ -101,7 +101,7 @@ static int panu_disconnect(struct btd_device *dev, struct btd_profile *profile)
|
||||
|
||||
static int panu_server_probe(struct btd_profile *p, struct btd_adapter *adapter)
|
||||
{
|
||||
const gchar *path = adapter_get_path(adapter);
|
||||
const char *path = adapter_get_path(adapter);
|
||||
|
||||
DBG("path %s", path);
|
||||
|
||||
@ -111,7 +111,7 @@ static int panu_server_probe(struct btd_profile *p, struct btd_adapter *adapter)
|
||||
static void panu_server_remove(struct btd_profile *p,
|
||||
struct btd_adapter *adapter)
|
||||
{
|
||||
const gchar *path = adapter_get_path(adapter);
|
||||
const char *path = adapter_get_path(adapter);
|
||||
|
||||
DBG("path %s", path);
|
||||
|
||||
@ -138,7 +138,7 @@ static int gn_disconnect(struct btd_device *dev, struct btd_profile *profile)
|
||||
|
||||
static int gn_server_probe(struct btd_profile *p, struct btd_adapter *adapter)
|
||||
{
|
||||
const gchar *path = adapter_get_path(adapter);
|
||||
const char *path = adapter_get_path(adapter);
|
||||
|
||||
DBG("path %s", path);
|
||||
|
||||
@ -148,7 +148,7 @@ static int gn_server_probe(struct btd_profile *p, struct btd_adapter *adapter)
|
||||
static void gn_server_remove(struct btd_profile *p,
|
||||
struct btd_adapter *adapter)
|
||||
{
|
||||
const gchar *path = adapter_get_path(adapter);
|
||||
const char *path = adapter_get_path(adapter);
|
||||
|
||||
DBG("path %s", path);
|
||||
|
||||
@ -175,7 +175,7 @@ static int nap_disconnect(struct btd_device *dev, struct btd_profile *profile)
|
||||
|
||||
static int nap_server_probe(struct btd_profile *p, struct btd_adapter *adapter)
|
||||
{
|
||||
const gchar *path = adapter_get_path(adapter);
|
||||
const char *path = adapter_get_path(adapter);
|
||||
|
||||
DBG("path %s", path);
|
||||
|
||||
@ -185,7 +185,7 @@ static int nap_server_probe(struct btd_profile *p, struct btd_adapter *adapter)
|
||||
static void nap_server_remove(struct btd_profile *p,
|
||||
struct btd_adapter *adapter)
|
||||
{
|
||||
const gchar *path = adapter_get_path(adapter);
|
||||
const char *path = adapter_get_path(adapter);
|
||||
|
||||
DBG("path %s", path);
|
||||
|
||||
|
@ -133,7 +133,7 @@ static const char * const temp_type[] = {
|
||||
"tympanum"
|
||||
};
|
||||
|
||||
static const gchar *temptype2str(uint8_t value)
|
||||
static const char *temptype2str(uint8_t value)
|
||||
{
|
||||
if (value > 0 && value < G_N_ELEMENTS(temp_type))
|
||||
return temp_type[value];
|
||||
@ -277,7 +277,7 @@ static void update_watcher(gpointer data, gpointer user_data)
|
||||
{
|
||||
struct watcher *w = data;
|
||||
struct measurement *m = user_data;
|
||||
const gchar *path = device_get_path(m->t->dev);
|
||||
const char *path = device_get_path(m->t->dev);
|
||||
DBusMessageIter iter;
|
||||
DBusMessageIter dict;
|
||||
DBusMessage *msg;
|
||||
@ -1164,7 +1164,7 @@ static void attio_disconnected_cb(gpointer user_data)
|
||||
static int thermometer_register(struct btd_device *device,
|
||||
struct gatt_primary *tattr)
|
||||
{
|
||||
const gchar *path = device_get_path(device);
|
||||
const char *path = device_get_path(device);
|
||||
struct thermometer *t;
|
||||
struct btd_adapter *adapter;
|
||||
struct thermometer_adapter *tadapter;
|
||||
|
Loading…
Reference in New Issue
Block a user