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

Avoid redundant arithmetic operations #28

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

linD026
Copy link

@linD026 linD026 commented Dec 18, 2024

Since multiple_size is always a power of two number, lets avoid redundant arithmetic operations.

Since multiple_size is always a power of two number,
lets avoid redundant arithmetic operations.
@doctorlai-msrc
Copy link
Collaborator

@linD026 Thanks for this. Could you re-target the branch to main ?

@linD026
Copy link
Author

linD026 commented Dec 18, 2024

Currently, it is targeting the main branch. Could you clarify what changes are needed?

@doctorlai-msrc
Copy link
Collaborator

doctorlai-msrc commented Dec 23, 2024

Currently, it is targeting the main branch. Could you clarify what changes are needed?

It shows this PR targets microsoft:main instead of main. Therefore the pipeline tests are not triggered.

@linD026
Copy link
Author

linD026 commented Dec 23, 2024

I have looked up other PR's behavior, their branch is in microsoft/jbpf repo, therefore, they can target to main.
If we move the cursor to the main word in the other PR, they will show the microsoft/jbpf:main which is the same as this PR.

Is Actions permissions set properly for this repo?

This might be helpful: GitHub Doc: Approving workflow runs from public forks

Anyone can fork a public repository, and then submit a pull request that proposes changes to the repository's GitHub Actions workflows. Although workflows from forks do not have access to sensitive data such as secrets, they can be an annoyance for maintainers if they are modified for abusive purposes.

To help prevent this, workflows on pull requests to public repositories from some outside contributors will not run automatically, and might need to be approved first. Depending on the "Approval for running fork pull request workflows from contributors" setting, workflows on pull requests to public repositories will not run automatically and may need approval if:

  • The pull request is created by a user that requires approvals based on the selected policy.
  • The pull request event is triggered by a user that requires approvals based on the selected policy.

By default, all first-time contributors require approval to run workflows.

If it is, and the approval is accepted, then I am not sure how to fix this.

@doctorlai-msrc doctorlai-msrc requested a review from xfoukas January 6, 2025 15:14
@doctorlai-msrc
Copy link
Collaborator

LGTM, @xfoukas when orig_size == 0 and multiple_size isn't 0. This function returns 0, but shouldn't it return the multiple_size instead?

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