File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 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)
278278
279279size_t Print::printNumber (unsigned long n, uint8_t base)
280280{
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.
282282 char *str = &buf[sizeof (buf) - 1 ];
283283
284284 *str = ' \0 ' ;
@@ -291,16 +291,16 @@ size_t Print::printNumber(unsigned long n, uint8_t base)
291291 do {
292292 char c = n % base;
293293 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);
297297
298298 return write (str);
299299}
300300
301301size_t Print::printNumber (unsigned long long n, uint8_t base)
302302{
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.
304304 char * str = &buf[sizeof (buf) - 1 ];
305305
306306 *str = ' \0 ' ;
@@ -311,7 +311,7 @@ size_t Print::printNumber(unsigned long long n, uint8_t base)
311311 }
312312
313313 do {
314- unsigned long m = n;
314+ auto m = n;
315315 n /= base;
316316 char c = m - base * n;
317317
You can’t perform that action at this time.
0 commit comments