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

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Feb 4 12:15:00 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):

 Different cypherpunks here.

 I agree with [comment:10 comment:10] that strings in switch statements
 should stay quoted or be quoted if they are not.
 The nitpicks that i have are to also quote the test parameters at the top
 of `configure.ac`; i.e.
 {{{
 if test -f /etc/redhat-release ; then
   if test -f /usr/kerberos/include ; then
     CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
   fi
 fi
 }}}
 and to add indentation to the lines you have wrapped in your patch for
 readability; i.e.
 {{{
 -if test x$enable_gcc_warnings = xyes || test
 x$enable_gcc_warnings_advisory = xyes; then
 +if test "x$enable_gcc_warnings" = "xyes" ||
 +test "x$enable_gcc_warnings_advisory" = "xyes"; then
 }}}
 becomes
 {{{
 -if test x$enable_gcc_warnings = xyes || test
 x$enable_gcc_warnings_advisory = xyes; then
 +if test "x$enable_gcc_warnings" = "xyes" ||
 +  test "x$enable_gcc_warnings_advisory" = "xyes"; then
 }}}

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


More information about the tor-bugs mailing list