[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r30955 - gnunet/src/util
From: |
gnunet |
Subject: |
[GNUnet-SVN] r30955 - gnunet/src/util |
Date: |
Thu, 28 Nov 2013 20:33:43 +0100 |
Author: grothoff
Date: 2013-11-28 20:33:43 +0100 (Thu, 28 Nov 2013)
New Revision: 30955
Modified:
gnunet/src/util/gnunet-ecc.c
Log:
-adding missing close
Modified: gnunet/src/util/gnunet-ecc.c
===================================================================
--- gnunet/src/util/gnunet-ecc.c 2013-11-28 19:31:54 UTC (rev 30954)
+++ gnunet/src/util/gnunet-ecc.c 2013-11-28 19:33:43 UTC (rev 30955)
@@ -113,7 +113,7 @@
static void
-print_examples_ecdh (void)
+print_examples_ecdh ()
{
struct GNUNET_CRYPTO_EcdhePrivateKey *dh_priv1;
struct GNUNET_CRYPTO_EcdhePublicKey *dh_pub1;
@@ -156,7 +156,7 @@
* Print some random example operations to stdout.
*/
static void
-print_examples (void)
+print_examples ()
{
print_examples_ecdh ();
// print_examples_ecdsa ();
@@ -178,7 +178,9 @@
if (GNUNET_YES != GNUNET_DISK_file_test (filename))
{
- fprintf (stderr, _("Hostkeys file not found: %s\n"), filename);
+ fprintf (stderr,
+ _("Hostkeys file `%s' not found\n"),
+ filename);
return;
}
@@ -187,13 +189,16 @@
fs = 0;
if (0 == fs)
{
- fprintf (stderr, _("Hostkeys file is empty: %s\n"), filename);
+ fprintf (stderr,
+ _("Hostkeys file `%s' is empty\n"),
+ filename);
return; /* File is empty */
}
if (0 != (fs % GNUNET_TESTING_HOSTKEYFILESIZE))
{
fprintf (stderr,
- _("Incorrect hostkey file format: %s\n"), filename);
+ _("Incorrect hostkey file format: %s\n"),
+ filename);
return;
}
fd = GNUNET_DISK_file_open (filename, GNUNET_DISK_OPEN_READ,
@@ -204,11 +209,13 @@
return;
}
hostkeys_data = GNUNET_malloc (fs);
- if (fs != GNUNET_DISK_file_read(fd, hostkeys_data, fs))
+ if (fs != GNUNET_DISK_file_read (fd, hostkeys_data, fs))
{
fprintf (stderr,
- _("Could not readk hostkey file: %s\n"), filename);
+ _("Could not read hostkey file: %s\n"),
+ filename);
GNUNET_free (hostkeys_data);
+ GNUNET_DISK_file_close (fd);
return;
}
GNUNET_DISK_file_close (fd);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r30955 - gnunet/src/util,
gnunet <=