audio: Remove not needed NULL pointer checks

g_new0 always returns valid pointer and there is no need to check that.
This commit is contained in:
Szymon Janc 2012-06-13 21:53:19 +02:00 committed by Johan Hedberg
parent e2d49cfa89
commit c1d6620752
4 changed files with 0 additions and 8 deletions

View File

@ -1535,8 +1535,6 @@ proceed:
int av_err;
server = g_new0(struct a2dp_server, 1);
if (!server)
return -ENOMEM;
av_err = avdtp_init(src, config, &server->version);
if (av_err < 0) {

View File

@ -823,8 +823,6 @@ int avctp_register(const bdaddr_t *src, gboolean master)
struct avctp_server *server;
server = g_new0(struct avctp_server, 1);
if (!server)
return -ENOMEM;
server->io = avctp_server_socket(src, master);
if (!server->io) {

View File

@ -3948,8 +3948,6 @@ int avdtp_init(const bdaddr_t *src, GKeyFile *config, uint16_t *version)
proceed:
server = g_new0(struct avdtp_server, 1);
if (!server)
return -ENOMEM;
server->version = ver;

View File

@ -1285,8 +1285,6 @@ int avrcp_register(DBusConnection *conn, const bdaddr_t *src, GKeyFile *config)
}
server = g_new0(struct avrcp_server, 1);
if (!server)
return -ENOMEM;
record = avrcp_tg_record();
if (!record) {