aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-03-04 19:07:05 +0100
committerChristian Grothoff <christian@grothoff.org>2017-03-04 19:07:05 +0100
commit6640e3beca224341f82216442c8e2d417199836f (patch)
tree1e4649e554023411f1b6f8e4632ae943fa25d841
parent3f9a2615b3bd0a55e0c69dba494b4fbfce7b80e9 (diff)
downloadgnunet-6640e3beca224341f82216442c8e2d417199836f.tar.gz
gnunet-6640e3beca224341f82216442c8e2d417199836f.zip
misc indentation changes
-rw-r--r--src/include/gnunet_configuration_lib.h7
-rw-r--r--src/util/disk.c21
2 files changed, 14 insertions, 14 deletions
diff --git a/src/include/gnunet_configuration_lib.h b/src/include/gnunet_configuration_lib.h
index 746dea61f..c1537e4f8 100644
--- a/src/include/gnunet_configuration_lib.h
+++ b/src/include/gnunet_configuration_lib.h
@@ -281,8 +281,8 @@ GNUNET_CONFIGURATION_get_value_number (const struct GNUNET_CONFIGURATION_Handle
281 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 281 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
282 */ 282 */
283int 283int
284GNUNET_CONFIGURATION_get_value_float (const struct GNUNET_CONFIGURATION_Handle 284GNUNET_CONFIGURATION_get_value_float (const struct GNUNET_CONFIGURATION_Handle *cfg,
285 *cfg, const char *section, 285 const char *section,
286 const char *option, 286 const char *option,
287 float *number); 287 float *number);
288 288
@@ -454,9 +454,6 @@ GNUNET_CONFIGURATION_get_data (const struct GNUNET_CONFIGURATION_Handle *cfg,
454 size_t buf_size); 454 size_t buf_size);
455 455
456 456
457
458
459
460/** 457/**
461 * Expand an expression of the form "$FOO/BAR" to "DIRECTORY/BAR" 458 * Expand an expression of the form "$FOO/BAR" to "DIRECTORY/BAR"
462 * where either in the "PATHS" section or the environtment "FOO" is 459 * where either in the "PATHS" section or the environtment "FOO" is
diff --git a/src/util/disk.c b/src/util/disk.c
index d3d5d87dc..d536ec897 100644
--- a/src/util/disk.c
+++ b/src/util/disk.c
@@ -329,8 +329,10 @@ GNUNET_DISK_file_get_identifiers (const char *filename, uint64_t * dev,
329 BY_HANDLE_FILE_INFORMATION info; 329 BY_HANDLE_FILE_INFORMATION info;
330 int succ; 330 int succ;
331 331
332 fh = GNUNET_DISK_file_open (filename, GNUNET_DISK_OPEN_READ, 0); 332 fh = GNUNET_DISK_file_open (filename,
333 if (fh == NULL) 333 GNUNET_DISK_OPEN_READ,
334 GNUNET_DISK_PERM_NONE);
335 if (NULL == fh)
334 return GNUNET_SYSERR; 336 return GNUNET_SYSERR;
335 succ = GetFileInformationByHandle (fh->h, &info); 337 succ = GetFileInformationByHandle (fh->h, &info);
336 GNUNET_DISK_file_close (fh); 338 GNUNET_DISK_file_close (fh);
@@ -1191,7 +1193,7 @@ GNUNET_DISK_fn_write (const char *fn,
1191 fh = GNUNET_DISK_file_open (fn, 1193 fh = GNUNET_DISK_file_open (fn,
1192 GNUNET_DISK_OPEN_WRITE | GNUNET_DISK_OPEN_TRUNCATE 1194 GNUNET_DISK_OPEN_WRITE | GNUNET_DISK_OPEN_TRUNCATE
1193 | GNUNET_DISK_OPEN_CREATE, mode); 1195 | GNUNET_DISK_OPEN_CREATE, mode);
1194 if (!fh) 1196 if (! fh)
1195 return GNUNET_SYSERR; 1197 return GNUNET_SYSERR;
1196 ret = GNUNET_DISK_file_write (fh, buffer, n); 1198 ret = GNUNET_DISK_file_write (fh, buffer, n);
1197 GNUNET_assert (GNUNET_OK == GNUNET_DISK_file_close (fh)); 1199 GNUNET_assert (GNUNET_OK == GNUNET_DISK_file_close (fh));
@@ -1756,9 +1758,10 @@ GNUNET_DISK_file_open (const char *fn,
1756 1758
1757 1759
1758/** 1760/**
1759 * Close an open file 1761 * Close an open file.
1762 *
1760 * @param h file handle 1763 * @param h file handle
1761 * @return GNUNET_OK on success, GNUNET_SYSERR otherwise 1764 * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise
1762 */ 1765 */
1763int 1766int
1764GNUNET_DISK_file_close (struct GNUNET_DISK_FileHandle *h) 1767GNUNET_DISK_file_close (struct GNUNET_DISK_FileHandle *h)
@@ -1773,7 +1776,7 @@ GNUNET_DISK_file_close (struct GNUNET_DISK_FileHandle *h)
1773 ret = GNUNET_OK; 1776 ret = GNUNET_OK;
1774 1777
1775#if MINGW 1778#if MINGW
1776 if (!CloseHandle (h->h)) 1779 if (! CloseHandle (h->h))
1777 { 1780 {
1778 SetErrnoFromWinError (GetLastError ()); 1781 SetErrnoFromWinError (GetLastError ());
1779 LOG_STRERROR (GNUNET_ERROR_TYPE_WARNING, "close"); 1782 LOG_STRERROR (GNUNET_ERROR_TYPE_WARNING, "close");
@@ -1781,7 +1784,7 @@ GNUNET_DISK_file_close (struct GNUNET_DISK_FileHandle *h)
1781 } 1784 }
1782 if (h->oOverlapRead) 1785 if (h->oOverlapRead)
1783 { 1786 {
1784 if (!CloseHandle (h->oOverlapRead->hEvent)) 1787 if (! CloseHandle (h->oOverlapRead->hEvent))
1785 { 1788 {
1786 SetErrnoFromWinError (GetLastError ()); 1789 SetErrnoFromWinError (GetLastError ());
1787 LOG_STRERROR (GNUNET_ERROR_TYPE_WARNING, "close"); 1790 LOG_STRERROR (GNUNET_ERROR_TYPE_WARNING, "close");
@@ -1822,7 +1825,6 @@ struct GNUNET_DISK_FileHandle *
1822GNUNET_DISK_get_handle_from_w32_handle (HANDLE osfh) 1825GNUNET_DISK_get_handle_from_w32_handle (HANDLE osfh)
1823{ 1826{
1824 struct GNUNET_DISK_FileHandle *fh; 1827 struct GNUNET_DISK_FileHandle *fh;
1825
1826 DWORD dwret; 1828 DWORD dwret;
1827 enum GNUNET_FILE_Type ftype; 1829 enum GNUNET_FILE_Type ftype;
1828 1830
@@ -1836,7 +1838,8 @@ GNUNET_DISK_get_handle_from_w32_handle (HANDLE osfh)
1836 ftype = GNUNET_DISK_HANLDE_TYPE_PIPE; 1838 ftype = GNUNET_DISK_HANLDE_TYPE_PIPE;
1837 break; 1839 break;
1838 case FILE_TYPE_UNKNOWN: 1840 case FILE_TYPE_UNKNOWN:
1839 if (GetLastError () == NO_ERROR || GetLastError () == ERROR_INVALID_HANDLE) 1841 if ( (GetLastError () == NO_ERROR) ||
1842 (GetLastError () == ERROR_INVALID_HANDLE) )
1840 { 1843 {
1841 if (0 != ResetEvent (osfh)) 1844 if (0 != ResetEvent (osfh))
1842 ftype = GNUNET_DISK_HANLDE_TYPE_EVENT; 1845 ftype = GNUNET_DISK_HANLDE_TYPE_EVENT;