aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2008-11-29 04:23:27 -0500
committerMike Frysinger <vapier@gentoo.org>2008-11-29 04:39:46 -0500
commit52e42743bfa7f107d47798c5e1282f2690701775 (patch)
treea750617e3e4b2172fbb7fda8ab7d266dc255bf78 /libsbutil/include
parentlibsandbox: use integers rather than strings for functions (diff)
downloadsandbox-52e42743bfa7f107d47798c5e1282f2690701775.tar.gz
sandbox-52e42743bfa7f107d47798c5e1282f2690701775.tar.bz2
sandbox-52e42743bfa7f107d47798c5e1282f2690701775.zip
libsbutil: drop bogus inline usage
Remove inline markings from functions whose bodies are never available at the point of inline calculation (i.e. they're always external functions). Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'libsbutil/include')
-rw-r--r--libsbutil/include/rcscripts/util/debug.h37
-rw-r--r--libsbutil/include/rcscripts/util/dynbuf.h5
2 files changed, 16 insertions, 26 deletions
diff --git a/libsbutil/include/rcscripts/util/debug.h b/libsbutil/include/rcscripts/util/debug.h
index b177c4f..a9f3e7b 100644
--- a/libsbutil/include/rcscripts/util/debug.h
+++ b/libsbutil/include/rcscripts/util/debug.h
@@ -87,27 +87,22 @@ debug_message (const char *file, const char *func, int line,
* They do not set errno.
*/
-inline bool check_ptr (const void *ptr);
-inline bool check_str (const char *str);
-inline bool check_strv (char **str);
-inline bool check_fd (int fd);
-inline bool check_fp (FILE * fp);
+bool check_ptr (const void *ptr);
+bool check_str (const char *str);
+bool check_strv (char **str);
+bool check_fd (int fd);
+bool check_fp (FILE * fp);
/*
* Functions and macro's to check validity of some types.
* They DO set errno to EINVAL.
*/
-inline bool __check_arg_ptr (const void *ptr, const char *file, const char *func,
- size_t line);
-inline bool __check_arg_str (const char *str, const char *file, const char *func,
- size_t line);
-inline bool __check_arg_strv (char **str, const char *file, const char *func,
- size_t line);
-inline bool __check_arg_fd (int fd, const char *file, const char *func,
- size_t line);
-inline bool __check_arg_fp (FILE * fp, const char *file, const char *func,
- size_t line);
+bool __check_arg_ptr (const void *ptr, const char *file, const char *func, size_t line);
+bool __check_arg_str (const char *str, const char *file, const char *func, size_t line);
+bool __check_arg_strv (char **str, const char *file, const char *func, size_t line);
+bool __check_arg_fd (int fd, const char *file, const char *func, size_t line);
+bool __check_arg_fp (FILE * fp, const char *file, const char *func, size_t line);
#define check_arg_ptr(_ptr) \
__check_arg_ptr (_ptr, __FILE__, __func__, __LINE__)
@@ -125,12 +120,9 @@ inline bool __check_arg_fp (FILE * fp, const char *file, const char *func,
* They set errno to ENOMEM and print debug info.
*/
-inline void *__xcalloc (size_t nmemb, size_t size, const char *file,
- const char *func, size_t line);
-inline void *__xmalloc (size_t size, const char *file, const char *func,
- size_t line);
-inline void *__xrealloc (void *ptr, size_t size, const char *file,
- const char *func, size_t line);
+void *__xcalloc (size_t nmemb, size_t size, const char *file, const char *func, size_t line);
+void *__xmalloc (size_t size, const char *file, const char *func, size_t line);
+void *__xrealloc (void *ptr, size_t size, const char *file, const char *func, size_t line);
#define xcalloc(_nmemb, _size) \
__xcalloc (_nmemb, _size, __FILE__, __func__, __LINE__)
@@ -139,8 +131,7 @@ inline void *__xrealloc (void *ptr, size_t size, const char *file,
#define xrealloc(_ptr, _size) \
__xrealloc (_ptr, _size, __FILE__, __func__, __LINE__)
-inline char *__xstrndup (const char *str, size_t size, const char *file,
- const char *func, size_t line);
+char *__xstrndup (const char *str, size_t size, const char *file, const char *func, size_t line);
#define xstrndup(_str, _size) \
__xstrndup (_str, _size, __FILE__, __func__, __LINE__)
diff --git a/libsbutil/include/rcscripts/util/dynbuf.h b/libsbutil/include/rcscripts/util/dynbuf.h
index 359c3b4..baa7553 100644
--- a/libsbutil/include/rcscripts/util/dynbuf.h
+++ b/libsbutil/include/rcscripts/util/dynbuf.h
@@ -42,9 +42,8 @@ int rc_dynbuf_replace_char (rc_dynbuf_t *dynbuf, const char old, const char new)
bool rc_dynbuf_read_eof (rc_dynbuf_t *dynbuf);
-inline bool rc_check_dynbuf (rc_dynbuf_t *dynbuf);
-inline bool __rc_check_arg_dynbuf (rc_dynbuf_t *dynbuf, const char *file,
- const char *func, size_t line);
+bool rc_check_dynbuf (rc_dynbuf_t *dynbuf);
+bool __rc_check_arg_dynbuf (rc_dynbuf_t *dynbuf, const char *file, const char *func, size_t line);
#define rc_check_arg_dynbuf(_dynbuf) \
__rc_check_arg_dynbuf (_dynbuf, __FILE__, __func__, __LINE__)