File tree 2 files changed +4
-2
lines changed
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -860,6 +860,7 @@ void createSharedObjects(void) {
860
860
}
861
861
862
862
void initServerConfig () {
863
+ server .arch_bits = (sizeof (long ) == 8 ) ? 64 : 32 ;
863
864
server .port = REDIS_SERVERPORT ;
864
865
server .bindaddr = NULL ;
865
866
server .unixsocket = NULL ;
@@ -1439,7 +1440,7 @@ sds genRedisInfoString(char *section) {
1439
1440
"redis_version:%s\r\n"
1440
1441
"redis_git_sha1:%s\r\n"
1441
1442
"redis_git_dirty:%d\r\n"
1442
- "arch_bits:%s \r\n"
1443
+ "arch_bits:%d \r\n"
1443
1444
"multiplexing_api:%s\r\n"
1444
1445
"gcc_version:%d.%d.%d\r\n"
1445
1446
"process_id:%ld\r\n"
@@ -1450,7 +1451,7 @@ sds genRedisInfoString(char *section) {
1450
1451
REDIS_VERSION ,
1451
1452
redisGitSHA1 (),
1452
1453
strtol (redisGitDirty (),NULL ,10 ) > 0 ,
1453
- ( sizeof ( long ) == 8 ) ? "64" : "32" ,
1454
+ server . arch_bits ,
1454
1455
aeGetApiName (),
1455
1456
#ifdef __GNUC__
1456
1457
__GNUC__ ,__GNUC_MINOR__ ,__GNUC_PATCHLEVEL__ ,
Original file line number Diff line number Diff line change @@ -527,6 +527,7 @@ struct redisServer {
527
527
int activerehashing ; /* Incremental rehash in serverCron() */
528
528
char * requirepass ; /* Pass for AUTH command, or NULL */
529
529
char * pidfile ; /* PID file path */
530
+ int arch_bits ; /* 32 or 64 depending on sizeof(long) */
530
531
/* Networking */
531
532
int port ; /* TCP listening port */
532
533
char * bindaddr ; /* Bind address or NULL */
You can’t perform that action at this time.
0 commit comments