From 1ddd76afa25d775788e3762ab731cad80f8ffe56 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 7 Dec 2007 06:18:59 +0000 Subject: Minor coding style fixes --- audio/a2dp.c | 2 +- audio/avdtp.c | 14 +++++++++----- audio/headset.c | 2 +- audio/unix.c | 16 +++++++++------- 4 files changed, 20 insertions(+), 14 deletions(-) diff --git a/audio/a2dp.c b/audio/a2dp.c index bf644359..95040873 100644 --- a/audio/a2dp.c +++ b/audio/a2dp.c @@ -270,7 +270,7 @@ static void stream_state_changed(struct avdtp_stream *stream, avdtp_unref(sep->session); sep->session = NULL; } - + sep->stream = NULL; } diff --git a/audio/avdtp.c b/audio/avdtp.c index cb2a99e6..b0b5b7cd 100644 --- a/audio/avdtp.c +++ b/audio/avdtp.c @@ -2079,7 +2079,8 @@ static gboolean conf_rej_to_err(struct conf_rej *rej, int size, } static gboolean stream_rej_to_err(struct stream_rej *rej, int size, - struct avdtp_error *err, uint8_t *acp_seid) + struct avdtp_error *err, + uint8_t *acp_seid) { if (size < sizeof(struct conf_rej)) { error("Too small packet for stream_rej"); @@ -2094,8 +2095,9 @@ static gboolean stream_rej_to_err(struct stream_rej *rej, int size, return TRUE; } -static gboolean avdtp_parse_rej(struct avdtp *session, struct avdtp_stream *stream, - struct avdtp_header *header, int size) +static gboolean avdtp_parse_rej(struct avdtp *session, + struct avdtp_stream *stream, + struct avdtp_header *header, int size) { struct avdtp_error err; uint8_t acp_seid, category; @@ -2355,7 +2357,8 @@ struct avdtp_service_capability *avdtp_service_cap_new(uint8_t category, return cap; } -int avdtp_discover(struct avdtp *session, avdtp_discover_cb_t cb, void *user_data) +int avdtp_discover(struct avdtp *session, avdtp_discover_cb_t cb, + void *user_data) { struct gen_req req; int ret; @@ -2879,7 +2882,8 @@ static GIOChannel *avdtp_server_socket(void) lm = L2CAP_LM_SECURE; if (setsockopt(sock, SOL_L2CAP, L2CAP_LM, &lm, sizeof(lm)) < 0) { - error("AVDTP server setsockopt: %s (%d)", strerror(errno), errno); + error("AVDTP server setsockopt: %s (%d)", strerror(errno), + errno); close(sock); return NULL; } diff --git a/audio/headset.c b/audio/headset.c index 6cb5406d..97419a64 100644 --- a/audio/headset.c +++ b/audio/headset.c @@ -65,7 +65,7 @@ #define HEADSET_GAIN_MICROPHONE 'M' static char *str_state[] = { - "HEADSET_STATE_DISCONNECTED", + "HEADSET_STATE_DISCONNECTED", "HEADSET_STATE_CONNECT_IN_PROGRESS", "HEADSET_STATE_CONNECTED", "HEADSET_STATE_PLAY_IN_PROGRESS", diff --git a/audio/unix.c b/audio/unix.c index 442dca79..d3e7485c 100644 --- a/audio/unix.c +++ b/audio/unix.c @@ -122,10 +122,10 @@ static void client_free(struct unix_client *client) g_free(client); } -/* Pass file descriptor through local domain sockets (AF_LOCAL, formerly AF_UNIX) -and the sendmsg() system call with the cmsg_type field of a "struct cmsghdr" set -to SCM_RIGHTS and the data being an integer value equal to the handle of the -file descriptor to be passed.*/ +/* Pass file descriptor through local domain sockets (AF_LOCAL, formerly + * AF_UNIX) and the sendmsg() system call with the cmsg_type field of a "struct + * cmsghdr" set to SCM_RIGHTS and the data being an integer value equal to the + * handle of the file descriptor to be passed. */ static int unix_sendmsg_fd(int sock, int fd) { char cmsg_b[CMSG_SPACE(sizeof(int))], m = 'm'; @@ -397,7 +397,7 @@ failed: static void a2dp_config_complete(struct avdtp *session, struct a2dp_sep *sep, struct avdtp_stream *stream, struct avdtp_error *err, - void *user_data) + void *user_data) { struct unix_client *client = user_data; char buf[BT_AUDIO_IPC_PACKET_SIZE]; @@ -420,7 +420,8 @@ static void a2dp_config_complete(struct avdtp *session, struct a2dp_sep *sep, a2dp->sep = sep; a2dp->stream = stream; - if (!avdtp_stream_get_transport(stream, &client->data_fd, &imtu, &omtu, &caps)) { + if (!avdtp_stream_get_transport(stream, &client->data_fd, &imtu, &omtu, + &caps)) { error("Unable to get stream transport"); goto failed; } @@ -1027,7 +1028,8 @@ int unix_init(void) } if (bind(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) { - error("Can't bind unix socket: %s (%d)", strerror(errno), errno); + error("Can't bind unix socket: %s (%d)", strerror(errno), + errno); close(sk); return -1; } -- cgit