summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-08-24 12:36:32 +0000
committerChristian Grothoff <christian@grothoff.org>2016-08-24 12:36:32 +0000
commitc42da981f4cd20f265eaffedc540c7c306407af2 (patch)
treeae299524b3c64ae3ba7cae5af05940b5eba0003f
parent98d3f2d41c3637938b4c0c33bde93e9d9d9d905a (diff)
-nicer indentation
-rw-r--r--doc/examples/tlsauthentication.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/doc/examples/tlsauthentication.c b/doc/examples/tlsauthentication.c
index f68a686f..30d19feb 100644
--- a/doc/examples/tlsauthentication.c
+++ b/doc/examples/tlsauthentication.c
@@ -83,6 +83,7 @@ get_file_size (const char *filename)
return 0;
}
+
static char *
load_file (const char *filename)
{
@@ -91,15 +92,15 @@ load_file (const char *filename)
long size;
size = get_file_size (filename);
- if (size == 0)
+ if (0 == size)
return NULL;
fp = fopen (filename, "rb");
- if (!fp)
+ if (! fp)
return NULL;
buffer = malloc (size + 1);
- if (!buffer)
+ if (! buffer)
{
fclose (fp);
return NULL;
@@ -116,6 +117,7 @@ load_file (const char *filename)
return buffer;
}
+
static int
ask_for_authentication (struct MHD_Connection *connection, const char *realm)
{
@@ -124,7 +126,7 @@ ask_for_authentication (struct MHD_Connection *connection, const char *realm)
char *headervalue;
const char *strbase = "Basic realm=";
- response = MHD_create_response_from_buffer (0, NULL,
+ response = MHD_create_response_from_buffer (0, NULL,
MHD_RESPMEM_PERSISTENT);
if (!response)
return MHD_NO;
@@ -198,7 +200,7 @@ secret_page (struct MHD_Connection *connection)
const char *page = "<html><body>A secret.</body></html>";
response =
- MHD_create_response_from_buffer (strlen (page), (void *) page,
+ MHD_create_response_from_buffer (strlen (page), (void *) page,
MHD_RESPMEM_PERSISTENT);
if (!response)
return MHD_NO;