MEDIUM: server: Tighten up parsing of weight string

Detect:
* Empty weight string, including no digits before '%' in relative
  weight string
* Trailing garbage, including between the last integer and '%'
  in relative weights

The motivation for this is to allow the weight string to be safely
logged if successfully parsed by this function

Signed-off-by: Simon Horman <horms@verge.net.au>
1 file changed