Bug 66576 - [PATCH] two small fixes for dbus hash: remove dead code, fix comments and remove redundant AND operation
Summary: [PATCH] two small fixes for dbus hash: remove dead code, fix comments and rem...
Status: RESOLVED MOVED
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: 1.5
Hardware: All All
: low trivial
Assignee: D-Bus Maintainers
QA Contact: D-Bus Maintainers
URL:
Whiteboard: sort of review-
Keywords: patch
Depends on:
Blocks:
 
Reported: 2013-07-04 08:02 UTC by Chengwei Yang
Modified: 2018-10-12 21:16 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
[PATCH 1/2] Hash: clean up dead code and fix comments (3.44 KB, patch)
2013-07-04 08:04 UTC, Chengwei Yang
Details | Splinter Review
[PATCH 2/2] Hash: remove redundant AND operation (725 bytes, patch)
2013-07-04 08:04 UTC, Chengwei Yang
Details | Splinter Review

Description Chengwei Yang 2013-07-04 08:02:53 UTC

    
Comment 1 Chengwei Yang 2013-07-04 08:04:30 UTC
Created attachment 82007 [details] [review]
[PATCH 1/2] Hash: clean up dead code and fix comments
Comment 2 Chengwei Yang 2013-07-04 08:04:59 UTC
Created attachment 82008 [details] [review]
[PATCH 2/2] Hash: remove redundant AND operation
Comment 3 Simon McVittie 2013-08-22 18:10:22 UTC
Comment on attachment 82008 [details] [review]
[PATCH 2/2] Hash: remove redundant AND operation

Review of attachment 82008 [details] [review]:
-----------------------------------------------------------------

If it's redundant, the compiler will hopefully remove it for us :-)

(I don't trust myself not to break dbus-hash. I don't think any of the current maintainers really understand it, and my thoughts on it are basically "it's bad that libdbus has to contain a hash table and can't use a library".)
Comment 4 Colin Walters 2013-10-10 16:25:15 UTC
(In reply to comment #3)
> Comment on attachment 82008 [details] [review] [review]
> [PATCH 2/2] Hash: remove redundant AND operation
> 
> Review of attachment 82008 [details] [review] [review]:
> -----------------------------------------------------------------
> 
> If it's redundant, the compiler will hopefully remove it for us :-)

It looks right to me, RANDOM_INDEX() clearly also does masking.
Comment 5 Simon McVittie 2013-10-10 17:25:38 UTC
(In reply to comment #4)
> It looks right to me, RANDOM_INDEX() clearly also does masking.

If you're sufficiently confident about these, please test and apply. I'm not going to make non-critical changes to this module myself - I think the necessary time for me to be sure about a positive review exceeds the benefit.
Comment 6 GitLab Migration User 2018-10-12 21:16:15 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/dbus/dbus/issues/85.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.