@@ -153,20 +153,20 @@ static inline void reset_out(void)
153
153
outbuf .idx = 0 ;
154
154
}
155
155
156
- static void outbuf_null_terminate (struct out_buffer * outbuf )
156
+ static void outbuf_null_terminate (struct out_buffer * out_buf )
157
157
{
158
- int idx = outbuf -> idx - ((outbuf -> idx == outbuf -> size ) ? 1 : 0 );
158
+ int idx = out_buf -> idx - ((out_buf -> idx == out_buf -> size ) ? 1 : 0 );
159
159
160
- outbuf -> buf [idx ] = 0 ;
160
+ out_buf -> buf [idx ] = 0 ;
161
161
}
162
162
163
163
static int out (int c , void * dest )
164
164
{
165
165
int rv = EOF ;
166
- struct out_buffer * buf = dest ;
166
+ struct out_buffer * out_buf = dest ;
167
167
168
- if (buf -> idx < buf -> size ) {
169
- buf -> buf [buf -> idx ++ ] = (char )(unsigned char )c ;
168
+ if (out_buf -> idx < out_buf -> size ) {
169
+ out_buf -> buf [out_buf -> idx ++ ] = (char )(unsigned char )c ;
170
170
rv = (int )(unsigned char )c ;
171
171
}
172
172
return rv ;
@@ -631,11 +631,11 @@ ZTEST(prf, test_x_length)
631
631
632
632
if (IS_ENABLED (CONFIG_CBPRINTF_FULL_INTEGRAL )
633
633
&& (sizeof (long long ) > sizeof (int ))) {
634
- unsigned long long min = 0x8c7c6c5c4c3c2c1cULL ;
635
- unsigned long long max = 0x8d7d6d5d4d3d2d1dULL ;
634
+ unsigned long long ull_min = 0x8c7c6c5c4c3c2c1cULL ;
635
+ unsigned long long ull_max = 0x8d7d6d5d4d3d2d1dULL ;
636
636
637
- TEST_PRF (& rc , "%llx/%llX" , (unsigned long long )min ,
638
- (unsigned long long )max );
637
+ TEST_PRF (& rc , "%llx/%llX" , (unsigned long long )ull_min ,
638
+ (unsigned long long )ull_max );
639
639
PRF_CHECK ("8c7c6c5c4c3c2c1c/8D7D6D5D4D3D2D1D" , rc );
640
640
}
641
641
}
@@ -1156,17 +1156,17 @@ ZTEST(prf, test_cbprintf_package)
1156
1156
/* Capture the base package information for future tests. */
1157
1157
size_t len = rc ;
1158
1158
/* Create a buffer aligned to max argument. */
1159
- uint8_t __aligned (CBPRINTF_PACKAGE_ALIGNMENT ) buf [len + PKG_ALIGN_OFFSET ];
1159
+ uint8_t __aligned (CBPRINTF_PACKAGE_ALIGNMENT ) out_buf [len + PKG_ALIGN_OFFSET ];
1160
1160
1161
1161
/* Verify we get same length when storing. Pass buffer which may be
1162
1162
* unaligned. Same alignment offset was used for space calculation.
1163
1163
*/
1164
- rc = cbprintf_package (& buf [PKG_ALIGN_OFFSET ], len , PACKAGE_FLAGS , fmt , 3 );
1164
+ rc = cbprintf_package (& out_buf [PKG_ALIGN_OFFSET ], len , PACKAGE_FLAGS , fmt , 3 );
1165
1165
zassert_equal (rc , len );
1166
1166
1167
1167
/* Verify we get an error if can't store */
1168
1168
len -= 1 ;
1169
- rc = cbprintf_package (& buf [PKG_ALIGN_OFFSET ], len , PACKAGE_FLAGS , fmt , 3 );
1169
+ rc = cbprintf_package (& out_buf [PKG_ALIGN_OFFSET ], len , PACKAGE_FLAGS , fmt , 3 );
1170
1170
zassert_equal (rc , - ENOSPC );
1171
1171
}
1172
1172
0 commit comments