give tor_version_parse_platform some function documentation

This commit is contained in:
Roger Dingledine 2017-02-14 03:52:01 -05:00 committed by Nick Mathewson
parent 02e05bd74d
commit 3c4da8a130

View File

@ -5512,9 +5512,14 @@ microdescs_parse_from_string(const char *s, const char *eos,
return result; return result;
} }
/** Parse the Tor version of the platform string <b>platform</b>, /** Extract a Tor version from a <b>platform</b> line from a router
* and compare it to the version in <b>cutoff</b>. Return 1 if * descriptor, and place the result in <b>router_version</b>.
* the router is at least as new as the cutoff, else return 0. *
* Return 1 on success, -1 on parsing failure, and 0 if the
* platform line does not indicate some version of Tor.
*
* If <b>strict</b> is non-zero, finding any weird version components
* (like negative numbers) counts as a parsing failure.
*/ */
int int
tor_version_parse_platform(const char *platform, tor_version_parse_platform(const char *platform,
@ -5552,6 +5557,7 @@ tor_version_parse_platform(const char *platform,
return -1; return -1;
} }
} }
return 1; return 1;
} }