gluon-neighbour-info: Do not use error()

error() is a glibc specific function and should not be used in
code meant to be portable.
This commit is contained in:
Hans-Werner Hilse 2015-07-05 22:25:54 +02:00
parent 1f3e66cf14
commit 66060cf08a
1 changed files with 4 additions and 2 deletions

View File

@ -176,8 +176,10 @@ int main(int argc, char **argv) {
fprintf(stderr, "Invalid parameter %c ignored.\n", c);
}
if (request_string == NULL)
error(EXIT_FAILURE, 0, "No request string supplied");
if (request_string == NULL) {
fprintf(stderr, "No request string supplied");
exit(EXIT_FAILURE);
}
if (sse)
fputs("Content-Type: text/event-stream\n\n", stdout);