summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorEtienne Samson <samson.etienne@gmail.com>2019-11-06 11:08:23 +0100
committerEtienne Samson <samson.etienne@gmail.com>2019-11-06 11:08:23 +0100
commitcd5e33fbc2d11477aad954a6f343e791fdc7ef85 (patch)
tree570b274c880395de39a5d53915395ea83e2bb065 /examples
parent882220bf116677ff6b89218a5c8bb618463013f4 (diff)
downloadlibgit2-cd5e33fbc2d11477aad954a6f343e791fdc7ef85.tar.gz
global: DRY includes of assert.h
Diffstat (limited to 'examples')
-rw-r--r--examples/add.c1
-rw-r--r--examples/checkout.c1
-rw-r--r--examples/common.c5
-rw-r--r--examples/common.h1
-rw-r--r--examples/describe.c1
-rw-r--r--examples/merge.c1
6 files changed, 4 insertions, 6 deletions
diff --git a/examples/add.c b/examples/add.c
index 14e69e96f..b0c4f600f 100644
--- a/examples/add.c
+++ b/examples/add.c
@@ -13,7 +13,6 @@
*/
#include "common.h"
-#include <assert.h>
/**
* The following example demonstrates how to add files with libgit2.
diff --git a/examples/checkout.c b/examples/checkout.c
index d552eece8..b706e044e 100644
--- a/examples/checkout.c
+++ b/examples/checkout.c
@@ -13,7 +13,6 @@
*/
#include "common.h"
-#include <assert.h>
/* Define the printf format specifer to use for size_t output */
#if defined(_MSC_VER) || defined(__MINGW32__)
diff --git a/examples/common.c b/examples/common.c
index 22807e129..47cfac6a0 100644
--- a/examples/common.c
+++ b/examples/common.c
@@ -12,7 +12,9 @@
* <http://creativecommons.org/publicdomain/zero/1.0/>.
*/
-#include <assert.h>
+
+#include "common.h"
+
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -25,7 +27,6 @@
#include <string.h>
#include <errno.h>
-#include "common.h"
void check_lg2(int error, const char *message, const char *extra)
{
diff --git a/examples/common.h b/examples/common.h
index 4f0181e38..3657e539b 100644
--- a/examples/common.h
+++ b/examples/common.h
@@ -14,6 +14,7 @@
#ifndef INCLUDE_examples_common_h__
#define INCLUDE_examples_common_h__
+#include <assert.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
diff --git a/examples/describe.c b/examples/describe.c
index 53f548c8b..181e499b0 100644
--- a/examples/describe.c
+++ b/examples/describe.c
@@ -13,7 +13,6 @@
*/
#include "common.h"
-#include <assert.h>
/**
* The following example partially reimplements the `git describe` command
diff --git a/examples/merge.c b/examples/merge.c
index 995ac021b..0cdeeeadf 100644
--- a/examples/merge.c
+++ b/examples/merge.c
@@ -13,7 +13,6 @@
*/
#include "common.h"
-#include <assert.h>
/** The following example demonstrates how to do merges with libgit2.
*