Skip to contentSkip to conversation

stemodem: Removed defaults in switches.

PATCH In review Marit Henriksen 2 participants 2 messages Jan 14, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 stemodem: Removed defaults in switches.

From: Marit Henriksen <[email protected]>

Coding style guidline M12.

---
 drivers/stemodem/voicecall.c |   17 +++++++----------
 1 files changed, 7 insertions(+), 10 deletions(-)
drivers/stemodem/voicecall.c +7 -10
index 99383cf..2ce315c 100644
@@ -76,7 +76,7 @@ struct change_state_req {
 };
 
 /* Translate from the ECAV-based STE-status to CLCC based status */
-static int call_status_ste_to_ofono(int status)
+static int call_status_ste_to_ofono(enum call_status_ste status)
 {
 	switch (status) {
 	case STE_CALL_STATUS_IDLE:
@@ -95,9 +95,9 @@ static int call_status_ste_to_ofono(int status)
 		return CALL_STATUS_INCOMING;
 	case STE_CALL_STATUS_BUSY:
 		return CALL_STATUS_DISCONNECTED;
-	default:
-		return CALL_STATUS_DISCONNECTED;
 	}
+
+	return CALL_STATUS_DISCONNECTED;
 }
 
 static struct ofono_call *create_call(struct ofono_voicecall *vc, int type,
@@ -198,22 +198,22 @@ static void ste_dial(struct ofono_voicecall *vc,
 		snprintf(buf, sizeof(buf), "ATD%s", ph->number);
 
 	switch (clir) {
+	case OFONO_CLIR_OPTION_DEFAULT:
+		break;
 	case OFONO_CLIR_OPTION_INVOCATION:
 		strcat(buf, "I");
 		break;
 	case OFONO_CLIR_OPTION_SUPPRESSION:
 		strcat(buf, "i");
 		break;
-	default:
-		break;
 	}
 
 	switch (cug) {
+	case OFONO_CUG_OPTION_DEFAULT:
+		break;
 	case OFONO_CUG_OPTION_INVOCATION:
 		strcat(buf, "G");
 		break;
-	default:
-		break;
 	}
 
 	strcat(buf, ";");
@@ -528,9 +528,6 @@ static void ecav_notify(GAtResult *result, gpointer user_data)
 		existing_call->status = status;
 		ofono_voicecall_notify(vc, existing_call);
 		break;
-
-	default:
-		break;
 	}
 }
 
Signature · 1 line
1.7.1
#1 lore raw

Hi Marit,

Quoted 4 lines

Coding style guidline M12.

---
 drivers/stemodem/voicecall.c |   17 +++++++----------
 1 files changed, 7 insertions(+), 10 deletions(-)

patch has been applied. Thanks.

Regards

Marcel