Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix calc_sever print_status npe bug #387

Merged
merged 3 commits into from
Nov 23, 2022

Conversation

tianjian600526
Copy link
Contributor

1、 fix ssl library path not found in my mac m1.
2、fix example npe bugs.

CMakeLists.txt Outdated
Comment on lines 88 to 95
include_directories(BEFORE
/usr/local/opt/openssl/include
/opt/homebrew/opt/[email protected]/include
)
link_directories(
/usr/local/opt/openssl/lib
/opt/homebrew/opt/[email protected]/lib
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please make a separate PR for this? There are two different fixes here. And also I recommend

if (APPLE)
    execute_process(COMMAND brew --prefix OUTPUT_VARIABLE BREW_PREFIX)
    message(STATUS "brew prefix ${BREW_PREFIX}")
    include_directories(BEFORE
        ${BREW_PREFIX}/opt/[email protected]/include
        /usr/local/opt/openssl/include
...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, I will do it later.

Comment on lines 155 to 157
<< ((stuff.sm_->last_snapshot() != nullptr) ? stuff.sm_->last_snapshot()->get_last_log_idx() : 0) << std::endl
<< "last snapshot log term: "
<< stuff.sm_->last_snapshot()->get_last_log_term() << std::endl
<< ((stuff.sm_->last_snapshot() != nullptr) ? stuff.sm_->last_snapshot()->get_last_log_term() : 0) << std::endl
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please break lines at 90 chars

ColumnLimit: 90

Also it can be simplified as follows

(stuff.sm_->last_snapshot() ? stuff.sm_->last_snapshot()->get_last_log_idx() : 0)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay.

Copy link
Contributor

@greensky00 greensky00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@greensky00 greensky00 merged commit fead587 into eBay:master Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants