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

Remove binary compare in parameterizedFeedURL method #278

Open
psychicpuppy opened this issue Jun 11, 2013 · 1 comment
Open

Remove binary compare in parameterizedFeedURL method #278

psychicpuppy opened this issue Jun 11, 2013 · 1 comment

Comments

@psychicpuppy
Copy link

This line of code in parameterizedFeedURL fails for me (line 4800;

sendingSystemProfile &= (-[lastSubmitDate timeIntervalSincenow] >= oneWeek);

This is always NO for me even when sendingSystemProfile is YES and lastSubmitDate is distandPast. Turns out the problem is the binary compare &=. If I break out the compare against oneWeek into a separate BOOL say:

BOOL timeLapsed = (-[lastSubmitDate timeIntervalSincenow] >= oneWeek);

and then change the logic to be:

sendSystemProfile = sendSystemProfile && timeLapsed;

it works ok. I've had this issue before in C code where the binary compare is not reliable. You need to use the Boolean compare.

@zorgiepoo
Copy link
Member

zorgiepoo commented Dec 25, 2022

I have not reproduced this issue however it wouldn't hurt to update this for clarity.

@zorgiepoo zorgiepoo changed the title Binary compare failing in SUUpdater parameterizedFeedURL method Remove binary compare in parameterizedFeedURL method Dec 26, 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

No branches or pull requests

2 participants