@@ -189,16 +189,16 @@ int ring_buf_item_put(struct ring_buf *buf, uint16_t type, uint8_t value,
189
189
uint8_t * dst , * data = (uint8_t * )data32 ;
190
190
struct ring_element * header ;
191
191
uint32_t space , size , partial_size , total_size ;
192
- int ret ;
192
+ int err ;
193
193
194
194
space = ring_buf_space_get (buf );
195
195
size = size32 * 4 ;
196
196
if (size + sizeof (struct ring_element ) > space ) {
197
197
return - EMSGSIZE ;
198
198
}
199
199
200
- ret = ring_buf_put_claim (buf , & dst , sizeof (struct ring_element ));
201
- __ASSERT_NO_MSG (ret == sizeof (struct ring_element ));
200
+ err = ring_buf_put_claim (buf , & dst , sizeof (struct ring_element ));
201
+ __ASSERT_NO_MSG (err == sizeof (struct ring_element ));
202
202
203
203
header = (struct ring_element * )dst ;
204
204
header -> type = type ;
@@ -215,9 +215,9 @@ int ring_buf_item_put(struct ring_buf *buf, uint16_t type, uint8_t value,
215
215
} while (size && partial_size );
216
216
__ASSERT_NO_MSG (size == 0 );
217
217
218
- ret = ring_buf_put_finish (buf , total_size );
219
- __ASSERT_NO_MSG (ret == 0 );
220
- ARG_UNUSED (ret );
218
+ err = ring_buf_put_finish (buf , total_size );
219
+ __ASSERT_NO_MSG (err == 0 );
220
+ ARG_UNUSED (err );
221
221
222
222
return 0 ;
223
223
}
@@ -228,14 +228,14 @@ int ring_buf_item_get(struct ring_buf *buf, uint16_t *type, uint8_t *value,
228
228
uint8_t * src , * data = (uint8_t * )data32 ;
229
229
struct ring_element * header ;
230
230
uint32_t size , partial_size , total_size ;
231
- int ret ;
231
+ int err ;
232
232
233
233
if (ring_buf_is_empty (buf )) {
234
234
return - EAGAIN ;
235
235
}
236
236
237
- ret = ring_buf_get_claim (buf , & src , sizeof (struct ring_element ));
238
- __ASSERT_NO_MSG (ret == sizeof (struct ring_element ));
237
+ err = ring_buf_get_claim (buf , & src , sizeof (struct ring_element ));
238
+ __ASSERT_NO_MSG (err == sizeof (struct ring_element ));
239
239
240
240
header = (struct ring_element * )src ;
241
241
@@ -262,9 +262,9 @@ int ring_buf_item_get(struct ring_buf *buf, uint16_t *type, uint8_t *value,
262
262
size -= partial_size ;
263
263
} while (size && partial_size );
264
264
265
- ret = ring_buf_get_finish (buf , total_size );
266
- __ASSERT_NO_MSG (ret == 0 );
267
- ARG_UNUSED (ret );
265
+ err = ring_buf_get_finish (buf , total_size );
266
+ __ASSERT_NO_MSG (err == 0 );
267
+ ARG_UNUSED (err );
268
268
269
269
return 0 ;
270
270
}
0 commit comments