File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -278,7 +278,7 @@ size_t Print::println(struct tm * timeinfo, const char * format)
278
278
279
279
size_t Print::printNumber (unsigned long n, uint8_t base)
280
280
{
281
- char buf[8 * sizeof (long ) + 1 ]; // Assumes 8-bit chars plus zero byte.
281
+ char buf[8 * sizeof (n ) + 1 ]; // Assumes 8-bit chars plus zero byte.
282
282
char *str = &buf[sizeof (buf) - 1 ];
283
283
284
284
*str = ' \0 ' ;
@@ -291,16 +291,16 @@ size_t Print::printNumber(unsigned long n, uint8_t base)
291
291
do {
292
292
char c = n % base;
293
293
n /= base;
294
-
295
- *--str = c < 10 ? c + ' 0' : c + ' A' - 10 ;
296
- } while (n);
294
+
295
+ *--str = c < 10 ? c + ' 0' : c + ' A' - 10 ;
296
+ } while (n);
297
297
298
298
return write (str);
299
299
}
300
300
301
301
size_t Print::printNumber (unsigned long long n, uint8_t base)
302
302
{
303
- char buf[8 * sizeof (long long ) + 1 ]; // Assumes 8-bit chars plus zero byte.
303
+ char buf[8 * sizeof (n ) + 1 ]; // Assumes 8-bit chars plus zero byte.
304
304
char * str = &buf[sizeof (buf) - 1 ];
305
305
306
306
*str = ' \0 ' ;
@@ -311,7 +311,7 @@ size_t Print::printNumber(unsigned long long n, uint8_t base)
311
311
}
312
312
313
313
do {
314
- unsigned long m = n;
314
+ auto m = n;
315
315
n /= base;
316
316
char c = m - base * n;
317
317
You can’t perform that action at this time.
0 commit comments