lookup-apn: Minor style issues

This commit is contained in:
Oleg Zhurakivskyy 2011-10-18 14:05:05 +03:00 committed by Denis Kenzior
parent 975c916789
commit 1f7e51d2d8
1 changed files with 11 additions and 12 deletions

View File

@ -23,7 +23,6 @@
#include <config.h> #include <config.h>
#endif #endif
#include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <glib.h> #include <glib.h>
@ -41,7 +40,7 @@ static void lookup_apn(const char *match_mcc, const char *match_mnc,
GSList *apns; GSList *apns;
GError *error = NULL; GError *error = NULL;
printf("Searching for info for network: %s%s\n", match_mcc, match_mnc); g_print("Searching for info for network: %s%s\n", match_mcc, match_mnc);
apns = mbpi_lookup(match_mcc, match_mnc, allow_duplicates, &error); apns = mbpi_lookup(match_mcc, match_mnc, allow_duplicates, &error);
@ -55,16 +54,16 @@ static void lookup_apn(const char *match_mcc, const char *match_mnc,
} }
for (l = apns; l; l = l->next) { for (l = apns; l; l = l->next) {
struct ofono_gprs_provision_data *apn = l->data; struct ofono_gprs_provision_data *ap = l->data;
printf("\n"); g_print("\n");
printf("Name: %s\n", apn->name); g_print("Name: %s\n", ap->name);
printf("APN: %s\n", apn->apn); g_print("APN: %s\n", ap->apn);
printf("Type: %s\n", mbpi_ap_type(apn->type)); g_print("Type: %s\n", mbpi_ap_type(ap->type));
printf("Username: %s\n", apn->username); g_print("Username: %s\n", ap->username);
printf("Password: %s\n", apn->password); g_print("Password: %s\n", ap->password);
mbpi_ap_free(apn); mbpi_ap_free(ap);
} }
g_slist_free(apns); g_slist_free(apns);
@ -101,12 +100,12 @@ int main(int argc, char **argv)
g_option_context_free(context); g_option_context_free(context);
if (option_version == TRUE) { if (option_version == TRUE) {
printf("%s\n", VERSION); g_print("%s\n", VERSION);
exit(0); exit(0);
} }
if (argc < 2) { if (argc < 2) {
fprintf(stderr, "Missing parameters\n"); g_printerr("Missing parameters\n");
exit(1); exit(1);
} }