[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] branch master updated (a16f6b613 -> 5a065f662)
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] branch master updated (a16f6b613 -> 5a065f662) |
Date: |
Sat, 05 Oct 2019 14:59:03 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a change to branch master
in repository gnunet.
from a16f6b613 style fix
new 6ecb8bb63 fix path
new 8c52967c1 reduce scope
new cf4cfd3f9 fix hook to only apply to C code
new dda0c6ca7 fix hook to only apply to C code
new 5a065f662 fix hook to only apply to C code
The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
bootstrap | 2 +-
contrib/uncrustify_precommit | 19 ++++++++++---------
src/util/crypto_ecc.c | 3 +--
3 files changed, 12 insertions(+), 12 deletions(-)
mode change 100644 => 100755 contrib/uncrustify_precommit
diff --git a/bootstrap b/bootstrap
index 1ff25a753..3972863be 100755
--- a/bootstrap
+++ b/bootstrap
@@ -16,7 +16,7 @@ if existence uncrustify; then
# Install uncrustify format symlink (if possible)
ln -s contrib/uncrustify.cfg uncrustify.cfg 2> /dev/null
# Install pre-commit hook (if possible)
- ln -s contrib/uncrustify_precommit .git/hooks/pre-commit 2> /dev/null
+ ln -s ../../contrib/uncrustify_precommit .git/hooks/pre-commit 2> /dev/null
else
echo "Uncrustify not detected, hook not installed. Please install
uncrustify if you plan on doing development"
fi
diff --git a/contrib/uncrustify_precommit b/contrib/uncrustify_precommit
old mode 100644
new mode 100755
index bf7bac4ef..bfea10304
--- a/contrib/uncrustify_precommit
+++ b/contrib/uncrustify_precommit
@@ -5,30 +5,31 @@
exec 1>&2
RET=0
-
changed=$(git diff --cached --name-only)
crustified=""
for f in $changed;
do
+ if echo $f | grep \\.[c,h]\$ > /dev/null
+ then
# compare result of uncrustify with changes
#
# only change any of the invocations here if
# they are portable across all cmp and shell
- # implementations!
- uncrustify -q -c uncrustify.cfg -f $f | cmp -s $f -
+ # implementations !
+ uncrustify - q - c uncrustify.cfg - f $f | cmp - s $f -
if test $? = 1 ;
then
- crustified=" $crustified $f"
- RET=1
+ crustified=" $crustified $f"
+ RET=1
fi
+ fi
done
if [ $RET = 1 ];
then
- echo "Run"
- echo "uncrustify --no-backup -c uncrustify.cfg ${crustified}"
- echo "before commiting."
+ echo "Run"
+ echo "uncrustify --no-backup -c uncrustify.cfg ${crustified}"
+ echo "before commiting."
fi
-
exit $RET
diff --git a/src/util/crypto_ecc.c b/src/util/crypto_ecc.c
index 9d141be2c..fed7c9ece 100644
--- a/src/util/crypto_ecc.c
+++ b/src/util/crypto_ecc.c
@@ -81,7 +81,6 @@ key_from_sexp(gcry_mpi_t *array,
{
gcry_sexp_t list;
gcry_sexp_t l2;
- const char *s;
unsigned int idx;
list = gcry_sexp_find_token(sexp, topname, 0);
@@ -94,7 +93,7 @@ key_from_sexp(gcry_mpi_t *array,
return 2;
idx = 0;
- for (s = elems; *s; s++, idx++)
+ for (const char *s = elems; *s; s++, idx++)
{
l2 = gcry_sexp_find_token(list, s, 1);
if (!l2)
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [GNUnet-SVN] [gnunet] branch master updated (a16f6b613 -> 5a065f662),
gnunet <=
- [GNUnet-SVN] [gnunet] 01/05: fix path, gnunet, 2019/10/05
- [GNUnet-SVN] [gnunet] 05/05: fix hook to only apply to C code, gnunet, 2019/10/05
- [GNUnet-SVN] [gnunet] 02/05: reduce scope, gnunet, 2019/10/05
- [GNUnet-SVN] [gnunet] 04/05: fix hook to only apply to C code, gnunet, 2019/10/05
- [GNUnet-SVN] [gnunet] 03/05: fix hook to only apply to C code, gnunet, 2019/10/05