[minicoredumper] [PATCH 5/6] Consistently use mcd_dump_data_t in the API
Simon Marchi
simon.marchi at ericsson.com
Tue Oct 13 23:56:23 CEST 2015
Both struct mcd_dump_data and mcd_dump_data_t are used in the API, I
think it would be good to keep it consistent and just use one
(mcd_dump_data_t in this case).
Signed-off-by: Simon Marchi <simon.marchi at ericsson.com>
---
src/api/mcd_dump_data_unregister.3 | 2 +-
src/api/minicoredumper.h | 5 +++--
src/libminicoredumper/mcd.c | 8 ++++----
3 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/src/api/mcd_dump_data_unregister.3 b/src/api/mcd_dump_data_unregister.3
index 33c7ee7..6243860 100644
--- a/src/api/mcd_dump_data_unregister.3
+++ b/src/api/mcd_dump_data_unregister.3
@@ -13,7 +13,7 @@ mcd_dump_data_unregister \- unregister previously registered dump data
.SH SYNOPSIS
.B #include <minicoredumper.h>
.PP
-.BI "int mcd_dump_data_unregister(struct mcd_dump_data *" dd );
+.BI "int mcd_dump_data_unregister(mcd_dump_data_t " dd );
.PP
Compile and link with
.IR -lminicoredumper .
diff --git a/src/api/minicoredumper.h b/src/api/minicoredumper.h
index 7d8f02e..1c8036a 100644
--- a/src/api/minicoredumper.h
+++ b/src/api/minicoredumper.h
@@ -139,7 +139,8 @@ extern int mcd_vdump_data_register_text(const char *ident,
*/
extern int mcd_dump_data_register_bin(const char *ident,
unsigned long dump_scope,
- mcd_dump_data_t *saveptr, void *data_ptr,
+ mcd_dump_data_t *saveptr,
+ void *data_ptr,
enum mcd_dump_data_flags ptr_flags,
size_t data_size);
@@ -149,7 +150,7 @@ extern int mcd_dump_data_register_bin(const char *ident,
*
* Returns 0 upon success, otherwise ENOKEY.
*/
-extern int mcd_dump_data_unregister(struct mcd_dump_data *dd);
+extern int mcd_dump_data_unregister(mcd_dump_data_t dd);
#ifdef __cplusplus
}
diff --git a/src/libminicoredumper/mcd.c b/src/libminicoredumper/mcd.c
index 367664f..2dac762 100644
--- a/src/libminicoredumper/mcd.c
+++ b/src/libminicoredumper/mcd.c
@@ -310,7 +310,7 @@ out:
}
int mcd_vdump_data_register_text(const char *ident, unsigned long dump_scope,
- struct mcd_dump_data **saveptr,
+ mcd_dump_data_t *saveptr,
const char *fmt, va_list ap)
{
struct dump_data_elem *es = NULL;
@@ -392,7 +392,7 @@ out_err:
}
int mcd_dump_data_register_text(const char *ident, unsigned long dump_scope,
- struct mcd_dump_data **saveptr,
+ mcd_dump_data_t *saveptr,
const char *fmt, ...)
{
va_list ap;
@@ -407,7 +407,7 @@ int mcd_dump_data_register_text(const char *ident, unsigned long dump_scope,
}
int mcd_dump_data_register_bin(const char *ident, unsigned long dump_scope,
- struct mcd_dump_data **saveptr, void *data_ptr,
+ mcd_dump_data_t *saveptr, void *data_ptr,
enum mcd_dump_data_flags ptr_flags,
size_t data_size)
{
@@ -465,7 +465,7 @@ out_err:
return err;
}
-int mcd_dump_data_unregister(struct mcd_dump_data *dd)
+int mcd_dump_data_unregister(mcd_dump_data_t dd)
{
struct mcd_dump_data *prev = NULL;
struct mcd_dump_data *iter;
--
2.5.1
More information about the minicoredumper
mailing list