aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmicli
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2017-01-23 10:25:03 +0100
committerAleksander Morgado <aleksander@aleksander.es>2017-01-23 12:22:06 +0100
commit0bdf397fcb2e7b263f3f83d5614cd856017efeb2 (patch)
tree43aeb327e9d71e494736723c06f91e447e6bb061 /src/qmicli
parente1f84bcd54d957644c2b104bd788247b84a57a42 (diff)
downloadexternal_libqmi-0bdf397fcb2e7b263f3f83d5614cd856017efeb2.zip
external_libqmi-0bdf397fcb2e7b263f3f83d5614cd856017efeb2.tar.gz
external_libqmi-0bdf397fcb2e7b263f3f83d5614cd856017efeb2.tar.bz2
qmicli,dms: define VALIDATE_UNKNOWN just once
Diffstat (limited to 'src/qmicli')
-rw-r--r--src/qmicli/qmicli-dms.c33
1 files changed, 3 insertions, 30 deletions
diff --git a/src/qmicli/qmicli-dms.c b/src/qmicli/qmicli-dms.c
index e486696..f9c1630 100644
--- a/src/qmicli/qmicli-dms.c
+++ b/src/qmicli/qmicli-dms.c
@@ -33,6 +33,9 @@
#include "qmicli.h"
#include "qmicli-helpers.h"
+#undef VALIDATE_UNKNOWN
+#define VALIDATE_UNKNOWN(str) (str ? str : "unknown")
+
/* Context */
typedef struct {
QmiDevice *device;
@@ -430,9 +433,6 @@ get_ids_ready (QmiClientDms *client,
return;
}
-#undef VALIDATE_UNKNOWN
-#define VALIDATE_UNKNOWN(str) (str ? str : "unknown")
-
qmi_message_dms_get_ids_output_get_esn (output, &esn, NULL);
qmi_message_dms_get_ids_output_get_imei (output, &imei, NULL);
qmi_message_dms_get_ids_output_get_meid (output, &meid, NULL);
@@ -541,9 +541,6 @@ get_manufacturer_ready (QmiClientDms *client,
return;
}
-#undef VALIDATE_UNKNOWN
-#define VALIDATE_UNKNOWN(str) (str ? str : "unknown")
-
qmi_message_dms_get_manufacturer_output_get_manufacturer (output, &str, NULL);
g_print ("[%s] Device manufacturer retrieved:\n"
@@ -579,9 +576,6 @@ get_model_ready (QmiClientDms *client,
return;
}
-#undef VALIDATE_UNKNOWN
-#define VALIDATE_UNKNOWN(str) (str ? str : "unknown")
-
qmi_message_dms_get_model_output_get_model (output, &str, NULL);
g_print ("[%s] Device model retrieved:\n"
@@ -617,9 +611,6 @@ get_revision_ready (QmiClientDms *client,
return;
}
-#undef VALIDATE_UNKNOWN
-#define VALIDATE_UNKNOWN(str) (str ? str : "unknown")
-
qmi_message_dms_get_revision_output_get_revision (output, &str, NULL);
g_print ("[%s] Device revision retrieved:\n"
@@ -655,9 +646,6 @@ get_msisdn_ready (QmiClientDms *client,
return;
}
-#undef VALIDATE_UNKNOWN
-#define VALIDATE_UNKNOWN(str) (str ? str : "unknown")
-
qmi_message_dms_get_msisdn_output_get_msisdn (output, &str, NULL);
g_print ("[%s] Device MSISDN retrieved:\n"
@@ -1139,9 +1127,6 @@ uim_get_iccid_ready (QmiClientDms *client,
return;
}
-#undef VALIDATE_UNKNOWN
-#define VALIDATE_UNKNOWN(str) (str ? str : "unknown")
-
qmi_message_dms_uim_get_iccid_output_get_iccid (output, &str, NULL);
g_print ("[%s] UIM ICCID retrieved:\n"
@@ -1177,9 +1162,6 @@ uim_get_imsi_ready (QmiClientDms *client,
return;
}
-#undef VALIDATE_UNKNOWN
-#define VALIDATE_UNKNOWN(str) (str ? str : "unknown")
-
qmi_message_dms_uim_get_imsi_output_get_imsi (output, &str, NULL);
g_print ("[%s] UIM IMSI retrieved:\n"
@@ -1498,9 +1480,6 @@ get_hardware_revision_ready (QmiClientDms *client,
return;
}
-#undef VALIDATE_UNKNOWN
-#define VALIDATE_UNKNOWN(str) (str ? str : "unknown")
-
qmi_message_dms_get_hardware_revision_output_get_revision (output, &str, NULL);
g_print ("[%s] Hardware revision retrieved:\n"
@@ -1537,9 +1516,6 @@ get_operating_mode_ready (QmiClientDms *client,
return;
}
-#undef VALIDATE_UNKNOWN
-#define VALIDATE_UNKNOWN(str) (str ? str : "unknown")
-
qmi_message_dms_get_operating_mode_output_get_mode (output, &mode, NULL);
g_print ("[%s] Operating mode retrieved:\n"
@@ -2426,9 +2402,6 @@ get_factory_sku_ready (QmiClientDms *client,
return;
}
-#undef VALIDATE_UNKNOWN
-#define VALIDATE_UNKNOWN(str) (str ? str : "unknown")
-
qmi_message_dms_get_factory_sku_output_get_sku (output, &str, NULL);
g_print ("[%s] Device factory SKU retrieved:\n"