[tor-bugs] #17744 [Tor]: Add quotes when comparing strings in configure script

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Feb 4 04:15:02 UTC 2016


#17744: Add quotes when comparing strings in configure script
-------------------------+------------------------------------
 Reporter:  cypherpunks  |          Owner:  zerosion
     Type:  defect       |         Status:  needs_review
 Priority:  Medium       |      Milestone:  Tor: 0.2.8.x-final
Component:  Tor          |        Version:  Tor: 0.2.7.5
 Severity:  Trivial      |     Resolution:
 Keywords:  easy         |  Actual Points:
Parent ID:               |         Points:
  Sponsor:               |
-------------------------+------------------------------------

Comment (by cypherpunks):

 I'm curious about why you wrap single-word literal strings in quotes, I'm
 sure you know this is unnecessary.

 I guess it can be argued that it's a bit more future-proof (if later that
 single-word string has to be turned into a multi-word string, one doesn't
 have to remember to add the quotes, they are already there); also it looks
 a bit more regular.

 But then again you also _remove_ them in equally superfluous cases where
 those same arguments would apply.

 For example you do:
 {{{
 -if test "$bwin32" = cross; then
 +if test "$bwin32" = "cross"; then
 }}}

 But also:
 {{{
 -case "$host_os" in
 +case $host_os in
 }}}

 What ho?

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


More information about the tor-bugs mailing list