fix compiler warning

fgets return type is (char *) and returns either the buffer or NULL on error.
The code looks as it is expecting that an integer is returned with -1
representing an error.  This triggers a warning with gcc's -Wpedantic enabled
(see ticket).

This patch checks whether returned value is NULL.

Ticket: http://rt.dcache.org/Ticket/Display.html?id=8319
Merge pull request #3 from paulmillar/fix/compiler-warning

fix compiler warning
src: remove dcap_url-test.c

Acked-by: Albert Rossi
dcap_url: accept IPv6 formated urls

split host to host and port

Target: master
Acked-By: Albert Rossi