From: Christian Grothoff Date: Sat, 4 Mar 2017 18:07:05 +0000 (+0100) Subject: misc indentation changes X-Git-Tag: taler-0.2.1~5 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6640e3beca224341f82216442c8e2d417199836f;p=oweals%2Fgnunet.git misc indentation changes --- 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 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error */ int -GNUNET_CONFIGURATION_get_value_float (const struct GNUNET_CONFIGURATION_Handle - *cfg, const char *section, +GNUNET_CONFIGURATION_get_value_float (const struct GNUNET_CONFIGURATION_Handle *cfg, + const char *section, const char *option, float *number); @@ -454,9 +454,6 @@ GNUNET_CONFIGURATION_get_data (const struct GNUNET_CONFIGURATION_Handle *cfg, size_t buf_size); - - - /** * Expand an expression of the form "$FOO/BAR" to "DIRECTORY/BAR" * 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, BY_HANDLE_FILE_INFORMATION info; int succ; - fh = GNUNET_DISK_file_open (filename, GNUNET_DISK_OPEN_READ, 0); - if (fh == NULL) + fh = GNUNET_DISK_file_open (filename, + GNUNET_DISK_OPEN_READ, + GNUNET_DISK_PERM_NONE); + if (NULL == fh) return GNUNET_SYSERR; succ = GetFileInformationByHandle (fh->h, &info); GNUNET_DISK_file_close (fh); @@ -1191,7 +1193,7 @@ GNUNET_DISK_fn_write (const char *fn, fh = GNUNET_DISK_file_open (fn, GNUNET_DISK_OPEN_WRITE | GNUNET_DISK_OPEN_TRUNCATE | GNUNET_DISK_OPEN_CREATE, mode); - if (!fh) + if (! fh) return GNUNET_SYSERR; ret = GNUNET_DISK_file_write (fh, buffer, n); GNUNET_assert (GNUNET_OK == GNUNET_DISK_file_close (fh)); @@ -1756,9 +1758,10 @@ GNUNET_DISK_file_open (const char *fn, /** - * Close an open file + * Close an open file. + * * @param h file handle - * @return GNUNET_OK on success, GNUNET_SYSERR otherwise + * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise */ int GNUNET_DISK_file_close (struct GNUNET_DISK_FileHandle *h) @@ -1773,7 +1776,7 @@ GNUNET_DISK_file_close (struct GNUNET_DISK_FileHandle *h) ret = GNUNET_OK; #if MINGW - if (!CloseHandle (h->h)) + if (! CloseHandle (h->h)) { SetErrnoFromWinError (GetLastError ()); LOG_STRERROR (GNUNET_ERROR_TYPE_WARNING, "close"); @@ -1781,7 +1784,7 @@ GNUNET_DISK_file_close (struct GNUNET_DISK_FileHandle *h) } if (h->oOverlapRead) { - if (!CloseHandle (h->oOverlapRead->hEvent)) + if (! CloseHandle (h->oOverlapRead->hEvent)) { SetErrnoFromWinError (GetLastError ()); LOG_STRERROR (GNUNET_ERROR_TYPE_WARNING, "close"); @@ -1822,7 +1825,6 @@ struct GNUNET_DISK_FileHandle * GNUNET_DISK_get_handle_from_w32_handle (HANDLE osfh) { struct GNUNET_DISK_FileHandle *fh; - DWORD dwret; enum GNUNET_FILE_Type ftype; @@ -1836,7 +1838,8 @@ GNUNET_DISK_get_handle_from_w32_handle (HANDLE osfh) ftype = GNUNET_DISK_HANLDE_TYPE_PIPE; break; case FILE_TYPE_UNKNOWN: - if (GetLastError () == NO_ERROR || GetLastError () == ERROR_INVALID_HANDLE) + if ( (GetLastError () == NO_ERROR) || + (GetLastError () == ERROR_INVALID_HANDLE) ) { if (0 != ResetEvent (osfh)) ftype = GNUNET_DISK_HANLDE_TYPE_EVENT;