Refactor out the 'find string at start of any line' logic.
commit235f1e1a967cb070c7246617461f58f0413394b3
authorNick Mathewson <nickm@torproject.org>
Thu, 17 Dec 2009 23:29:37 +0000 (17 18:29 -0500)
committerNick Mathewson <nickm@torproject.org>
Thu, 17 Dec 2009 23:29:37 +0000 (17 18:29 -0500)
tree63c260d4d5c4a6f54fa620836ed291a94f6d332e
parent498c293afe3570210e964456e6cf5a8f315dbfc6
Refactor out the 'find string at start of any line' logic.

We do this in too many places throughout the code; it's time to start
clamping down.

Also, refactor Karsten's patch to use strchr-then-strndup, rather than
malloc-then-strlcpy-then-strchr-then-clear.
src/common/util.c
src/common/util.h
src/or/geoip.c
src/test/test_util.c