Change in osmocom-bb[master]: host/layer23/sap_interface.c: cosmetic: use ARRAY_SIZE()

2018-12-19 Thread Vadim Yanitskiy
Vadim Yanitskiy has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/12351 )

Change subject: host/layer23/sap_interface.c: cosmetic: use ARRAY_SIZE()
..

host/layer23/sap_interface.c: cosmetic: use ARRAY_SIZE()

Change-Id: I3a2908bf11300ec681beddb5a54f9a62ca5430ae
---
M src/host/layer23/src/common/sap_interface.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  Pau Espin Pedrol: Looks good to me, but someone else must approve
  Stefan Sperling: Looks good to me, but someone else must approve
  Max: Looks good to me, approved



diff --git a/src/host/layer23/src/common/sap_interface.c 
b/src/host/layer23/src/common/sap_interface.c
index 936beb3..a32c3aa 100644
--- a/src/host/layer23/src/common/sap_interface.c
+++ b/src/host/layer23/src/common/sap_interface.c
@@ -177,7 +177,7 @@
get_value_string(sap_result_names, 
param->value[0]));
}

-   if(param->value[0] > sizeof(sap_result_names)/sizeof(struct 
value_string)){
+   if(param->value[0] > ARRAY_SIZE(sap_result_names)){
return -1;
}


--
To view, visit https://gerrit.osmocom.org/12351
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I3a2908bf11300ec681beddb5a54f9a62ca5430ae
Gerrit-Change-Number: 12351
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 


Change in osmocom-bb[master]: host/layer23/sap_interface.c: cosmetic: use ARRAY_SIZE()

2018-12-18 Thread Max
Max has posted comments on this change. ( https://gerrit.osmocom.org/12351 )

Change subject: host/layer23/sap_interface.c: cosmetic: use ARRAY_SIZE()
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/12351
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3a2908bf11300ec681beddb5a54f9a62ca5430ae
Gerrit-Change-Number: 12351
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Tue, 18 Dec 2018 18:24:44 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmocom-bb[master]: host/layer23/sap_interface.c: cosmetic: use ARRAY_SIZE()

2018-12-18 Thread Stefan Sperling
Stefan Sperling has posted comments on this change. ( 
https://gerrit.osmocom.org/12351 )

Change subject: host/layer23/sap_interface.c: cosmetic: use ARRAY_SIZE()
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/12351
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3a2908bf11300ec681beddb5a54f9a62ca5430ae
Gerrit-Change-Number: 12351
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Tue, 18 Dec 2018 17:18:33 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmocom-bb[master]: host/layer23/sap_interface.c: cosmetic: use ARRAY_SIZE()

2018-12-18 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/12351 )

Change subject: host/layer23/sap_interface.c: cosmetic: use ARRAY_SIZE()
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/12351/1/src/host/layer23/src/common/sap_interface.c
File src/host/layer23/src/common/sap_interface.c:

https://gerrit.osmocom.org/#/c/12351/1/src/host/layer23/src/common/sap_interface.c@180
PS1, Line 180:  if(param->value[0] > ARRAY_SIZE(sap_result_names)){
> Next time take the chance to clean the formatting of the line too.
Actually, the whole file needs such reformatting ;)



--
To view, visit https://gerrit.osmocom.org/12351
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3a2908bf11300ec681beddb5a54f9a62ca5430ae
Gerrit-Change-Number: 12351
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Tue, 18 Dec 2018 17:07:51 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmocom-bb[master]: host/layer23/sap_interface.c: cosmetic: use ARRAY_SIZE()

2018-12-18 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/12351 )

Change subject: host/layer23/sap_interface.c: cosmetic: use ARRAY_SIZE()
..


Patch Set 1: Code-Review+1

(1 comment)

https://gerrit.osmocom.org/#/c/12351/1/src/host/layer23/src/common/sap_interface.c
File src/host/layer23/src/common/sap_interface.c:

https://gerrit.osmocom.org/#/c/12351/1/src/host/layer23/src/common/sap_interface.c@180
PS1, Line 180:  if(param->value[0] > ARRAY_SIZE(sap_result_names)){
Next time take the chance to clean the formatting of the line too.



--
To view, visit https://gerrit.osmocom.org/12351
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3a2908bf11300ec681beddb5a54f9a62ca5430ae
Gerrit-Change-Number: 12351
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Tue, 18 Dec 2018 16:58:01 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmocom-bb[master]: host/layer23/sap_interface.c: cosmetic: use ARRAY_SIZE()

2018-12-18 Thread Vadim Yanitskiy
Vadim Yanitskiy has uploaded this change for review. ( 
https://gerrit.osmocom.org/12351


Change subject: host/layer23/sap_interface.c: cosmetic: use ARRAY_SIZE()
..

host/layer23/sap_interface.c: cosmetic: use ARRAY_SIZE()

Change-Id: I3a2908bf11300ec681beddb5a54f9a62ca5430ae
---
M src/host/layer23/src/common/sap_interface.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/51/12351/1

diff --git a/src/host/layer23/src/common/sap_interface.c 
b/src/host/layer23/src/common/sap_interface.c
index 936beb3..a32c3aa 100644
--- a/src/host/layer23/src/common/sap_interface.c
+++ b/src/host/layer23/src/common/sap_interface.c
@@ -177,7 +177,7 @@
get_value_string(sap_result_names, 
param->value[0]));
}

-   if(param->value[0] > sizeof(sap_result_names)/sizeof(struct 
value_string)){
+   if(param->value[0] > ARRAY_SIZE(sap_result_names)){
return -1;
}


--
To view, visit https://gerrit.osmocom.org/12351
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3a2908bf11300ec681beddb5a54f9a62ca5430ae
Gerrit-Change-Number: 12351
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy