Change in libosmocore[master]: bitvec: cosmetic: init i only once in bitvec_[un]pack()

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Sat Feb 22 19:39:59 UTC 2020


laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17219 )

Change subject: bitvec: cosmetic: init i only once in bitvec_[un]pack()
......................................................................

bitvec: cosmetic: init i only once in bitvec_[un]pack()

Change-Id: I5606ca34a72d42a9b6aafed662b995f9fa77be09
---
M src/bitvec.c
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved



diff --git a/src/bitvec.c b/src/bitvec.c
index 6202227..2219b71 100644
--- a/src/bitvec.c
+++ b/src/bitvec.c
@@ -431,7 +431,7 @@
  *  \return number of bytes (= bits) copied */
 unsigned int bitvec_pack(const struct bitvec *bv, uint8_t *buffer)
 {
-	unsigned int i = 0;
+	unsigned int i;
 	for (i = 0; i < bv->data_len; i++)
 		buffer[i] = bv->data[i];
 
@@ -444,7 +444,7 @@
  *  \return number of bytes (= bits) copied */
 unsigned int bitvec_unpack(struct bitvec *bv, const uint8_t *buffer)
 {
-	unsigned int i = 0;
+	unsigned int i;
 	for (i = 0; i < bv->data_len; i++)
 		bv->data[i] = buffer[i];
 

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I5606ca34a72d42a9b6aafed662b995f9fa77be09
Gerrit-Change-Number: 17219
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200222/8bab6de5/attachment.htm>


More information about the gerrit-log mailing list