sw_limits: add const for limits param for config_get

The sr_sw_limits_config_get() routine exclusively reads the 'limits'
parameter, need not write to it. Add the 'const' attribute.
This commit is contained in:
Gerhard Sittig 2020-08-03 17:48:38 +02:00
parent 0dc27cd1db
commit d579755a66
2 changed files with 2 additions and 2 deletions

View File

@ -2392,7 +2392,7 @@ struct sr_sw_limits {
uint64_t start_time; uint64_t start_time;
}; };
SR_PRIV int sr_sw_limits_config_get(struct sr_sw_limits *limits, uint32_t key, SR_PRIV int sr_sw_limits_config_get(const struct sr_sw_limits *limits, uint32_t key,
GVariant **data); GVariant **data);
SR_PRIV int sr_sw_limits_config_set(struct sr_sw_limits *limits, uint32_t key, SR_PRIV int sr_sw_limits_config_set(struct sr_sw_limits *limits, uint32_t key,
GVariant *data); GVariant *data);

View File

@ -57,7 +57,7 @@ SR_PRIV void sr_sw_limits_init(struct sr_sw_limits *limits)
* @param data config item data * @param data config item data
* @return SR_ERR_NA if @p key is not a supported limit, SR_OK otherwise * @return SR_ERR_NA if @p key is not a supported limit, SR_OK otherwise
*/ */
SR_PRIV int sr_sw_limits_config_get(struct sr_sw_limits *limits, uint32_t key, SR_PRIV int sr_sw_limits_config_get(const struct sr_sw_limits *limits, uint32_t key,
GVariant **data) GVariant **data)
{ {
switch (key) { switch (key) {