Format code.
This commit is contained in:
parent
11a7b6653d
commit
a358ca795d
2 changed files with 21 additions and 20 deletions
|
@ -3,25 +3,26 @@
|
||||||
|
|
||||||
#include <Log.h>
|
#include <Log.h>
|
||||||
|
|
||||||
int Main(Array *args, HashMap *env)
|
int
|
||||||
|
Main(Array * args, HashMap * env)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
char *key;
|
char *key;
|
||||||
char *val;
|
char *val;
|
||||||
|
|
||||||
Log(LOG_INFO, "Hello World!");
|
Log(LOG_INFO, "Hello World!");
|
||||||
Log(LOG_INFO, "Arguments: %lu", ArraySize(args));
|
Log(LOG_INFO, "Arguments: %lu", ArraySize(args));
|
||||||
|
|
||||||
for (i = 0; i < ArraySize(args); i++)
|
for (i = 0; i < ArraySize(args); i++)
|
||||||
{
|
{
|
||||||
Log(LOG_INFO, " [%ld] %s", i, ArrayGet(args, i));
|
Log(LOG_INFO, " [%ld] %s", i, ArrayGet(args, i));
|
||||||
}
|
}
|
||||||
|
|
||||||
Log(LOG_INFO, "Environment:");
|
Log(LOG_INFO, "Environment:");
|
||||||
while (HashMapIterate(env, &key, (void **) &val))
|
while (HashMapIterate(env, &key, (void **) &val))
|
||||||
{
|
{
|
||||||
Log(LOG_INFO, " %s = %s", key, val);
|
Log(LOG_INFO, " %s = %s", key, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -292,21 +292,21 @@ HttpServerCreate(HttpServerConfig * config)
|
||||||
|
|
||||||
if (!config)
|
if (!config)
|
||||||
{
|
{
|
||||||
errno = EINVAL;
|
errno = EINVAL;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!config->handler)
|
if (!config->handler)
|
||||||
{
|
{
|
||||||
errno = EINVAL;
|
errno = EINVAL;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TLS_IMPL
|
#ifndef TLS_IMPL
|
||||||
if (config->flags & HTTP_FLAG_TLS)
|
if (config->flags & HTTP_FLAG_TLS)
|
||||||
{
|
{
|
||||||
Log(LOG_ERR, "TLS support is disabled.");
|
Log(LOG_ERR, "TLS support is disabled.");
|
||||||
errno = EINVAL;
|
errno = EINVAL;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue