summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-12-24 07:09:09 -0800
committerMarcel Holtmann <marcel@holtmann.org>2009-12-24 07:09:09 -0800
commit0b359e89dba1da799393eb8d098475fd643159fe (patch)
tree87143dc08a9168c8d9938844818bc427ddf80e1f /src
parent2876e1aa64dfcdcb17248cf41b41512977ebcbc2 (diff)
downloadofono-0b359e89dba1da799393eb8d098475fd643159fe.tar.bz2
Use error label instead of err or err_out
Diffstat (limited to 'src')
-rw-r--r--src/gprs.c26
-rw-r--r--src/util.c12
-rw-r--r--src/voicecall.c8
3 files changed, 23 insertions, 23 deletions
diff --git a/src/gprs.c b/src/gprs.c
index ce70efac..57e8b2a9 100644
--- a/src/gprs.c
+++ b/src/gprs.c
@@ -1755,61 +1755,61 @@ static gboolean load_context(struct ofono_gprs *gprs, const char *group)
if ((name = g_key_file_get_string(gprs->settings, group,
"Name", NULL)) == NULL)
- goto err;
+ goto error;
if ((typestr = g_key_file_get_string(gprs->settings, group,
"Type", NULL)) == NULL)
- goto err;
+ goto error;
type = gprs_context_string_to_type(typestr);
if (type == GPRS_CONTEXT_TYPE_INVALID)
- goto err;
+ goto error;
username = g_key_file_get_string(gprs->settings, group,
"Username", NULL);
if (!username)
- goto err;
+ goto error;
if (strlen(username) > OFONO_GPRS_MAX_USERNAME_LENGTH)
- goto err;
+ goto error;
password = g_key_file_get_string(gprs->settings, group,
"Password", NULL);
if (!password)
- goto err;
+ goto error;
if (strlen(password) > OFONO_GPRS_MAX_PASSWORD_LENGTH)
- goto err;
+ goto error;
apn = g_key_file_get_string(gprs->settings, group,
"AccessPointName", NULL);
if (!apn)
- goto err;
+ goto error;
if (strlen(apn) > OFONO_GPRS_MAX_APN_LENGTH)
- goto err;
+ goto error;
/* Accept empty (just created) APNs, but don't allow other
* invalid ones */
if (apn[0] != '\0' && is_valid_apn(apn) == FALSE)
- goto err;
+ goto error;
if ((context = pri_context_create(gprs, name, type)) == NULL)
- goto err;
+ goto error;
strcpy(context->context.username, username);
strcpy(context->context.password, password);
strcpy(context->context.apn, apn);
if (context_dbus_register(context) == FALSE)
- goto err;
+ goto error;
gprs->contexts = g_slist_append(gprs->contexts, context);
ret = TRUE;
-err:
+error:
g_free(name);
g_free(typestr);
g_free(username);
diff --git a/src/util.c b/src/util.c
index 9f6cfdc2..2a74e97c 100644
--- a/src/util.c
+++ b/src/util.c
@@ -555,7 +555,7 @@ char *convert_gsm_to_utf8_with_lang(const unsigned char *text, long len,
return NULL;
if (len < 0 && !terminator)
- goto err_out;
+ goto error;
if (len < 0) {
i = 0;
@@ -570,17 +570,17 @@ char *convert_gsm_to_utf8_with_lang(const unsigned char *text, long len,
unsigned short c;
if (text[i] > 0x7f)
- goto err_out;
+ goto error;
if (text[i] == 0x1b) {
++i;
if (i >= len)
- goto err_out;
+ goto error;
c = gsm_single_shift_lookup(text[i], single_lang);
if (c == GUND)
- goto err_out;
+ goto error;
} else {
c = gsm_locking_shift_lookup(text[i], locking_lang);
}
@@ -591,7 +591,7 @@ char *convert_gsm_to_utf8_with_lang(const unsigned char *text, long len,
res = g_malloc(res_length + 1);
if (!res)
- goto err_out;
+ goto error;
out = res;
@@ -614,7 +614,7 @@ char *convert_gsm_to_utf8_with_lang(const unsigned char *text, long len,
if (items_written)
*items_written = out - res;
-err_out:
+error:
if (items_read)
*items_read = i;
diff --git a/src/voicecall.c b/src/voicecall.c
index 3912abeb..21a80c4d 100644
--- a/src/voicecall.c
+++ b/src/voicecall.c
@@ -1550,21 +1550,21 @@ void ofono_voicecall_notify(struct ofono_voicecall *vc,
if (!newcall) {
ofono_error("Unable to allocate call");
- goto err;
+ goto error;
}
v = voicecall_create(vc, newcall);
if (!v) {
ofono_error("Unable to allocate voicecall_data");
- goto err;
+ goto error;
}
v->detect_time = time(NULL);
if (!voicecall_dbus_register(v)) {
ofono_error("Unable to register voice call");
- goto err;
+ goto error;
}
vc->call_list = g_slist_insert_sorted(vc->call_list, v, call_compare);
@@ -1573,7 +1573,7 @@ void ofono_voicecall_notify(struct ofono_voicecall *vc,
return;
-err:
+error:
if (newcall)
g_free(newcall);