[tor-bugs] #4889 [Tor Client]: Cleanup: use smartlist_add_asprintf() rather than tor_asprintf+smartlist_add()

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Sat Jan 14 03:33:40 UTC 2012


#4889: Cleanup: use smartlist_add_asprintf() rather than
tor_asprintf+smartlist_add()
------------------------+---------------------------------------------------
 Reporter:  nickm       |          Owner:                    
     Type:  defect      |         Status:  needs_review      
 Priority:  normal      |      Milestone:  Tor: 0.2.3.x-final
Component:  Tor Client  |        Version:                    
 Keywords:              |         Parent:                    
   Points:              |   Actualpoints:                    
------------------------+---------------------------------------------------

Comment(by Sebastian):

 The original branch has two commits with the exact same description, so
 the autosquash will not do what you want. Be careful when rebasing this.
 It'd probably make sense to squash the two commits with the same
 description together, or give them a different first line of description -
 any time I read a commit list where two entries are the same next by each
 other, I'm going to assume something went weird when the commits were
 made.

 Otherwise, I couldn't find a problem with either the original branch nor
 the fixups you introduced here.

 If you want, I have a branch with the history of your branch somewhat
 cleaned up (imo) in my bug4889 branch, so you don't have to wrangle with
 git yourself. The diff to your branch is this:
 {{{
 index 6138201..ef96c06 100644
 --- a/changes/clean_asprintf
 +++ b/changes/clean_asprintf
 @@ -2,4 +2,6 @@
      - Use the smartlist_add_asprintf alias more consistently
        throughout the codebase.
      - Convert more instances of tor_snprintf+tor_strdup into
 -      tor_asprintf.
 \ No newline at end of file
 +      tor_asprintf.
 +    - Convert more instances of tor_snprintf+tor_malloc into
 +      tor_asprintf.
 }}}

 but also note the changes in commit message to make them distinct.

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/4889#comment:6>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list