Skip to content

Commit 282abfe

Browse files
committed
Drop register keyword
1 parent 02e48d9 commit 282abfe

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

main/snprintf.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959

6060
static char * __cvt(double value, int ndigit, int *decpt, bool *sign, int fmode, int pad) /* {{{ */
6161
{
62-
register char *s = NULL;
62+
char *s = NULL;
6363
char *p, *rve, c;
6464
size_t siz;
6565

@@ -308,11 +308,11 @@ PHPAPI char *php_gcvt(double value, int ndigit, char dec_point, char exponent, c
308308
* is declared as buf[ 100 ], buf_end should be &buf[ 100 ])
309309
*/
310310
/* char * ap_php_conv_10() {{{ */
311-
PHPAPI char * ap_php_conv_10(register int64_t num, register bool is_unsigned,
312-
register bool * is_negative, char *buf_end, register size_t *len)
311+
PHPAPI char * ap_php_conv_10(int64_t num, bool is_unsigned,
312+
bool * is_negative, char *buf_end, size_t *len)
313313
{
314-
register char *p = buf_end;
315-
register uint64_t magnitude;
314+
char *p = buf_end;
315+
uint64_t magnitude;
316316

317317
if (is_unsigned) {
318318
magnitude = (uint64_t) num;
@@ -341,7 +341,7 @@ PHPAPI char * ap_php_conv_10(register int64_t num, register bool is_unsigned,
341341
* We use a do-while loop so that we write at least 1 digit
342342
*/
343343
do {
344-
register uint64_t new_magnitude = magnitude / 10;
344+
uint64_t new_magnitude = magnitude / 10;
345345

346346
*--p = (char)(magnitude - new_magnitude * 10 + '0');
347347
magnitude = new_magnitude;
@@ -366,11 +366,11 @@ PHPAPI char * ap_php_conv_10(register int64_t num, register bool is_unsigned,
366366
* in buf).
367367
*/
368368
/* PHPAPI char * php_conv_fp() {{{ */
369-
PHPAPI char * php_conv_fp(register char format, register double num,
369+
PHPAPI char * php_conv_fp(char format, double num,
370370
bool add_dp, int precision, char dec_point, bool * is_negative, char *buf, size_t *len)
371371
{
372-
register char *s = buf;
373-
register char *p, *p_orig;
372+
char *s = buf;
373+
char *p, *p_orig;
374374
int decimal_point;
375375

376376
if (precision >= NDIG - 1) {
@@ -471,13 +471,13 @@ PHPAPI char * php_conv_fp(register char format, register double num,
471471
* which is a pointer to the END of the buffer + 1 (i.e. if the buffer
472472
* is declared as buf[ 100 ], buf_end should be &buf[ 100 ])
473473
*/
474-
PHPAPI char * ap_php_conv_p2(register uint64_t num, register int nbits, char format, char *buf_end, register size_t *len) /* {{{ */
474+
PHPAPI char * ap_php_conv_p2(uint64_t num, int nbits, char format, char *buf_end, size_t *len) /* {{{ */
475475
{
476-
register int mask = (1 << nbits) - 1;
477-
register char *p = buf_end;
476+
int mask = (1 << nbits) - 1;
477+
char *p = buf_end;
478478
static const char low_digits[] = "0123456789abcdef";
479479
static const char upper_digits[] = "0123456789ABCDEF";
480-
register const char *digits = (format == 'X') ? upper_digits : low_digits;
480+
const char *digits = (format == 'X') ? upper_digits : low_digits;
481481

482482
do {
483483
*--p = digits[num & mask];
@@ -568,7 +568,7 @@ typedef struct buf_area buffy;
568568
/*
569569
* Do format conversion placing the output in buffer
570570
*/
571-
static size_t format_converter(register buffy * odp, const char *fmt, va_list ap) /* {{{ */
571+
static size_t format_converter(buffy * odp, const char *fmt, va_list ap) /* {{{ */
572572
{
573573
char *sp;
574574
char *bep;

0 commit comments

Comments
 (0)