<p>dexter has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/11049">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">gsm0808_utils: constify parameter<br><br>parameter cfg in gsm0808_sc_cfg_from_gsm48_mr_cfg() is used read only.<br>Lets add a const to make this clear to the compiler.<br><br>Change-Id: I31e8d273b070b0afc446a298299d4f502d6c396b<br>---<br>M include/osmocom/gsm/gsm0808_utils.h<br>M src/gsm/gsm0808_utils.c<br>2 files changed, 2 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/49/11049/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/include/osmocom/gsm/gsm0808_utils.h b/include/osmocom/gsm/gsm0808_utils.h</span><br><span>index 0a7429e..8746ceb 100644</span><br><span>--- a/include/osmocom/gsm/gsm0808_utils.h</span><br><span>+++ b/include/osmocom/gsm/gsm0808_utils.h</span><br><span>@@ -104,7 +104,7 @@</span><br><span> int gsm0808_chan_type_to_speech_codec(uint8_t perm_spch);</span><br><span> int gsm0808_speech_codec_from_chan_type(struct gsm0808_speech_codec *sc,</span><br><span>                                   uint8_t perm_spch);</span><br><span style="color: hsl(0, 100%, 40%);">-uint16_t gsm0808_sc_cfg_from_gsm48_mr_cfg(struct gsm48_multi_rate_conf *cfg, bool fr);</span><br><span style="color: hsl(120, 100%, 40%);">+uint16_t gsm0808_sc_cfg_from_gsm48_mr_cfg(const struct gsm48_multi_rate_conf *cfg, bool fr);</span><br><span> </span><br><span> /*! Return 3GPP TS 48.008 3.2.2.49 Current Channel Type 1 from enum gsm_chan_t. */</span><br><span> static inline uint8_t gsm0808_current_channel_type_1(enum gsm_chan_t type)</span><br><span>diff --git a/src/gsm/gsm0808_utils.c b/src/gsm/gsm0808_utils.c</span><br><span>index 4b2a5f5..0d6938e 100644</span><br><span>--- a/src/gsm/gsm0808_utils.c</span><br><span>+++ b/src/gsm/gsm0808_utils.c</span><br><span>@@ -1166,7 +1166,7 @@</span><br><span>  *  \param[in] cfg AMR configuration in GSM 04.08 format.</span><br><span>  *  \param[in] hint if the resulting configuration shall be used with a FR or HR TCH.</span><br><span>  *  \returns configuration bits (S0-S15) */</span><br><span style="color: hsl(0, 100%, 40%);">-uint16_t gsm0808_sc_cfg_from_gsm48_mr_cfg(struct gsm48_multi_rate_conf *cfg,</span><br><span style="color: hsl(120, 100%, 40%);">+uint16_t gsm0808_sc_cfg_from_gsm48_mr_cfg(const struct gsm48_multi_rate_conf *cfg,</span><br><span>                                          bool fr)</span><br><span> {</span><br><span>      uint16_t s15_s0 = 0;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/11049">change 11049</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/11049"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I31e8d273b070b0afc446a298299d4f502d6c396b </div>
<div style="display:none"> Gerrit-Change-Number: 11049 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@sysmocom.de> </div>