[minicoredumper] [PATCH 6/6] Change saveptr to save_ptr

Simon Marchi simon.marchi at ericsson.com
Tue Oct 13 23:56:24 CEST 2015


It's not super import, but just as a matter of consistency with data_ptr that
is right next to it.

Signed-off-by: Simon Marchi <simon.marchi at ericsson.com>
---
 src/api/mcd_dump_data_register_bin.3  |  4 ++--
 src/api/mcd_dump_data_register_text.3 |  6 +++---
 src/api/minicoredumper.h              | 18 +++++++++---------
 src/libminicoredumper/mcd.c           | 24 ++++++++++++------------
 4 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/src/api/mcd_dump_data_register_bin.3 b/src/api/mcd_dump_data_register_bin.3
index 6968f6b..d64cb8c 100644
--- a/src/api/mcd_dump_data_register_bin.3
+++ b/src/api/mcd_dump_data_register_bin.3
@@ -16,7 +16,7 @@ mcd_dump_data_register_bin \- register binary data to be dumped
 .nf
 .BI "int mcd_dump_data_register_bin(const char *" ident ,
 .BI "                               unsigned long " dump_scope ,
-.BI "                               mcd_dump_data_t *" saveptr ,
+.BI "                               mcd_dump_data_t *" save_ptr ,
 .BI "                               void *" data_ptr ,
 .BI "                               enum mcd_dump_data_flags " ptr_flags ,
 .BI "                               size_t " data_size );
@@ -41,7 +41,7 @@ file. The data will only be dumped if a scope value greater than or equal to
 is requested by the
 .BR minicoredumper (1).
 If
-.I saveptr
+.I save_ptr
 is non-NULL, a pointer to the registered dump will be stored there. This
 is needed if
 .BR mcd_dump_data_unregister (3)
diff --git a/src/api/mcd_dump_data_register_text.3 b/src/api/mcd_dump_data_register_text.3
index b56a510..47d41b1 100644
--- a/src/api/mcd_dump_data_register_text.3
+++ b/src/api/mcd_dump_data_register_text.3
@@ -17,14 +17,14 @@ register text data to be dumped
 .nf
 .BI "int mcd_dump_data_register_text(const char *" ident ,
 .BI "                                unsigned long " dump_scope ,
-.BI "                                mcd_dump_data_t *" saveptr ,
+.BI "                                mcd_dump_data_t *" save_ptr ,
 .BI "                                const char *" fmt ", ...);"
 .fi
 .PP
 .nf
 .BI "int mcd_vdump_data_register_text(const char *" ident ,
 .BI "                                 unsigned long " dump_scope ,
-.BI "                                 mcd_dump_data_t *" saveptr ,
+.BI "                                 mcd_dump_data_t *" save_ptr ,
 .BI "                                 const char *" fmt ,
 .BI "                                 va_list " ap);
 .fi
@@ -48,7 +48,7 @@ The data will only be dumped if a scope value greater than or equal to
 is requested by the
 .BR minicoredumper (1).
 If
-.I saveptr
+.I save_ptr
 is non-NULL, a pointer to the registered dump will be stored there. This
 is needed if
 .BR mcd_dump_data_unregister (3)
diff --git a/src/api/minicoredumper.h b/src/api/minicoredumper.h
index 1c8036a..bb4d8e2 100644
--- a/src/api/minicoredumper.h
+++ b/src/api/minicoredumper.h
@@ -85,8 +85,8 @@ extern void mcd_dump_data_dbus_stop(void);
  *         dump is appended to previously registered text dumps with the same
  *         @ident.
  * @dump_scope: Define scope witch needs to be dumped
- * @saveptr: If non-NULL, will contain a pointer to the registered data dump,
- *           needed if @mcd_dump_data_unregister will be used.
+ * @save_ptr: If non-NULL, will contain a pointer to the registered data dump,
+ *            needed if @mcd_dump_data_unregister will be used.
  * @fmt: Format string used to print the data.
  * @...: n pointers to interesting data
  *
@@ -94,7 +94,7 @@ extern void mcd_dump_data_dbus_stop(void);
  */
 extern int mcd_dump_data_register_text(const char *ident,
 				       unsigned long dump_scope,
-				       mcd_dump_data_t *saveptr,
+				       mcd_dump_data_t *save_ptr,
 				       const char *fmt, ...);
 
 /*
@@ -107,8 +107,8 @@ extern int mcd_dump_data_register_text(const char *ident,
  *         dump is appended to previously registered text dumps with the same
  *         @ident.
  * @dump_scope: Define scope witch needs to be dumped
- * @saveptr: If non-NULL, will contain a pointer to the registered data dump,
- *           needed if @mcd_dump_data_unregister will be used.
+ * @save_ptr: If non-NULL, will contain a pointer to the registered data dump,
+ *            needed if @mcd_dump_data_unregister will be used.
  * @fmt: Format string used to print the data.
  * @ap: va_list of pointers to interesting data
  *
@@ -116,7 +116,7 @@ extern int mcd_dump_data_register_text(const char *ident,
  */
 extern int mcd_vdump_data_register_text(const char *ident,
 					unsigned long dump_scope,
-					mcd_dump_data_t *saveptr,
+					mcd_dump_data_t *save_ptr,
 					const char *fmt,
 					va_list ap);
 
@@ -128,8 +128,8 @@ extern int mcd_vdump_data_register_text(const char *ident,
  * @ident: A string to identify the binary dump later. Must be unique!
  *         If NULL, data is stored to core file.
  * @dump_scope: Define scope witch needs to be dumped
- * @saveptr: If non-NULL, will contain a pointer to the registered data dump,
- *           needed if @mcd_dump_data_unregister will be used.
+ * @save_ptr: If non-NULL, will contain a pointer to the registered data dump,
+ *            needed if @mcd_dump_data_unregister will be used.
  * @data_ptr: The memory location to read from.
  * @ptr_flags: MCD_DATA_PTR_DIRECT or MCD_DATA_PTR_INDIRECT;
  *             see enum mcd_dump_data_ptr_type
@@ -139,7 +139,7 @@ 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,
+				      mcd_dump_data_t *save_ptr,
 				      void *data_ptr,
 				      enum mcd_dump_data_flags ptr_flags,
 				      size_t data_size);
diff --git a/src/libminicoredumper/mcd.c b/src/libminicoredumper/mcd.c
index 2dac762..3f9f8a1 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,
-				 mcd_dump_data_t *saveptr,
+				 mcd_dump_data_t *save_ptr,
 				 const char *fmt, va_list ap)
 {
 	struct dump_data_elem *es = NULL;
@@ -372,8 +372,8 @@ int mcd_vdump_data_register_text(const char *ident, unsigned long dump_scope,
 		goto out_err;
 	}
 
-	if (saveptr)
-		*saveptr = dd;
+	if (save_ptr)
+		*save_ptr = dd;
 
 	free(argtypes);
 
@@ -385,21 +385,21 @@ out_err:
 	if (dd)
 		free_dump_data(dd);
 
-	if (saveptr)
-		*saveptr = NULL;
+	if (save_ptr)
+		*save_ptr = NULL;
 
 	return err;
 }
 
 int mcd_dump_data_register_text(const char *ident, unsigned long dump_scope,
-				mcd_dump_data_t *saveptr,
+				mcd_dump_data_t *save_ptr,
 				const char *fmt, ...)
 {
 	va_list ap;
 	int err;
 
 	va_start(ap, fmt);
-	err = mcd_vdump_data_register_text(ident, dump_scope, saveptr,
+	err = mcd_vdump_data_register_text(ident, dump_scope, save_ptr,
 					   fmt, ap);
 	va_end(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,
-			       mcd_dump_data_t *saveptr, void *data_ptr,
+			       mcd_dump_data_t *save_ptr, void *data_ptr,
 			       enum mcd_dump_data_flags ptr_flags,
 			       size_t data_size)
 {
@@ -451,16 +451,16 @@ int mcd_dump_data_register_bin(const char *ident, unsigned long dump_scope,
 		goto out_err;
 	}
 
-	if (saveptr)
-		*saveptr = dd;
+	if (save_ptr)
+		*save_ptr = dd;
 
 	return 0;
 out_err:
 	if (dd)
 		free_dump_data(dd);
 
-	if (saveptr)
-		*saveptr = NULL;
+	if (save_ptr)
+		*save_ptr = NULL;
 
 	return err;
 }
-- 
2.5.1





More information about the minicoredumper mailing list