codestyle: get rid of CALLS_SET_PTR_PROPERTY macro
One more step towards fixing #214 In `calls-ofono-call.c` the changed code also adheres to the newly introduced coding style.
This commit is contained in:
@@ -25,7 +25,6 @@
|
||||
#include "calls-ofono-call.h"
|
||||
#include "calls-call.h"
|
||||
#include "calls-message-source.h"
|
||||
#include "util.h"
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
|
||||
@@ -287,11 +286,10 @@ static void
|
||||
disconnect_reason_cb (CallsOfonoCall *self,
|
||||
const gchar *reason)
|
||||
{
|
||||
if (reason)
|
||||
{
|
||||
CALLS_SET_PTR_PROPERTY (self->disconnect_reason,
|
||||
g_strdup (reason));
|
||||
}
|
||||
if (reason) {
|
||||
g_free (self->disconnect_reason);
|
||||
self->disconnect_reason = g_strdup (reason);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
*/
|
||||
|
||||
#include "calls-call-record.h"
|
||||
#include "util.h"
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
|
||||
@@ -132,7 +131,8 @@ set_property (GObject *object,
|
||||
break;
|
||||
|
||||
case PROP_TARGET:
|
||||
CALLS_SET_PTR_PROPERTY (self->target, g_value_dup_string (value));
|
||||
g_free (self->target);
|
||||
self->target = g_value_dup_string (value);
|
||||
break;
|
||||
|
||||
case PROP_INBOUND:
|
||||
|
||||
@@ -88,11 +88,6 @@ G_BEGIN_DECLS
|
||||
CALLS_DEFINE_IFACE_GETTER_BASE(calls,iface,Calls,Iface,CALLS,IFACE,prop,rettype,errval)
|
||||
|
||||
|
||||
#define CALLS_SET_PTR_PROPERTY(ptr,new_value) \
|
||||
g_free (ptr); \
|
||||
ptr = new_value;
|
||||
|
||||
|
||||
#define calls_clear_source(source_id_ptr) \
|
||||
if (*source_id_ptr != 0) \
|
||||
{ \
|
||||
|
||||
Reference in New Issue
Block a user