diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2016-10-14 00:33:39 +0200 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2016-10-14 00:33:39 +0200 |
commit | 613f53b44279c44a8f53783d2dc4410584133431 (patch) | |
tree | 1f6bb8c959f523682294824681e9131ece27adfd /src/blogc-runserver/httpd.c | |
parent | 8664aa16e2df5d94a594785661283a39340db2fd (diff) | |
download | blogc-613f53b44279c44a8f53783d2dc4410584133431.tar.gz blogc-613f53b44279c44a8f53783d2dc4410584133431.tar.bz2 blogc-613f53b44279c44a8f53783d2dc4410584133431.zip |
runserver: blogc/loader: improve strto*l handling
Diffstat (limited to 'src/blogc-runserver/httpd.c')
-rw-r--r-- | src/blogc-runserver/httpd.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/blogc-runserver/httpd.c b/src/blogc-runserver/httpd.c index 195bad0..1312ec9 100644 --- a/src/blogc-runserver/httpd.c +++ b/src/blogc-runserver/httpd.c @@ -212,6 +212,11 @@ int br_httpd_run(const char *host, unsigned short port, const char *docroot, size_t max_threads) { + if (port == 0) { + fprintf(stderr, "Invalid port: 0\n"); + return 1; + } + thread_data_t threads[max_threads]; for (size_t i = 0; i < max_threads; i++) threads[i].initialized = false; |