gcc-compat.h: Remove _static_inline_ macro.
authorAndre Noll <maan@tuebingen.mpg.de>
Mon, 6 Nov 2017 00:52:03 +0000 (01:52 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Tue, 14 Nov 2017 03:26:05 +0000 (04:26 +0100)
The only purpose of this macro is to have a way to include static
inline functions into the doxygen source code documentation (but omit
normal static functions in .c files).  Since dss does not use doxygen,
the macro is pointless.

Remove the equally pointless documentation of dss_rename(), one
of the two users of _static_inline_, while converting it to plain
static inline.

file.h
gcc-compat.h
snap.h

diff --git a/file.h b/file.h
index 140a505ba01b1fe3adb3614e118103517a722384..f82643a57fe961d3d1f67c837b69f794670188d0 100644 (file)
--- a/file.h
+++ b/file.h
@@ -5,17 +5,7 @@
  */
 int for_each_subdir(int (*func)(const char *, void *), void *private_data);
 __must_check int mark_fd_nonblocking(int fd);
-/**
- * A wrapper for rename(2).
- *
- * \param old_path The source path.
- * \param new_path The destination path.
- *
- * \return Standard.
- *
- * \sa rename(2).
- */
-_static_inline_ int dss_rename(const char *old_path, const char *new_path)
+static inline int dss_rename(const char *old_path, const char *new_path)
 {
        if (rename(old_path, new_path) >= 0)
                return 1;
index 2622fd3dbabd3b5e570c7f706b02537e178316ca..258a3cb279b7e9045da566a17f9f7d8f52f6b40d 100644 (file)
@@ -25,5 +25,3 @@
 #else
 # define __must_check  /* no warn_unused_result */
 #endif
-
-#define _static_inline_ static inline
diff --git a/snap.h b/snap.h
index 626ecad003a52a1a465ea6f7f2e11f960a97df3c..489b67a2fbbb39f69533e50bfc996b1c7db20525 100644 (file)
--- a/snap.h
+++ b/snap.h
@@ -93,7 +93,7 @@ int num_complete_snapshots(struct snapshot_list *sl);
 /**
  * Get the newest snapshot in a snapshot list.
  */
-_static_inline_ struct snapshot *get_newest_snapshot(struct snapshot_list *sl)
+static inline struct snapshot *get_newest_snapshot(struct snapshot_list *sl)
 {
        if (!sl->num_snapshots)
                return NULL;