[tor-commits] [tor/master] Rename smartlist_{v, }asprintf_add to smartlist_add_{v, }asprintf
nickm at torproject.org
nickm at torproject.org
Mon Jan 16 20:06:33 UTC 2012
commit 9c6d913b9e1b84ffcefb2cbd9cfe6f7bd15fc9b3
Author: Nick Mathewson <nickm at torproject.org>
Date: Wed Jan 11 13:15:52 2012 -0500
Rename smartlist_{v,}asprintf_add to smartlist_add_{v,}asprintf
---
src/common/util.c | 8 ++++----
src/common/util.h | 4 ++--
src/or/control.c | 4 ++--
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/common/util.c b/src/common/util.c
index 22c816a..a4a7006 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -2757,17 +2757,17 @@ tor_sscanf(const char *buf, const char *pattern, ...)
/** Append the string produced by tor_asprintf(<b>pattern</b>, <b>...</b>)
* to <b>sl</b>. */
void
-smartlist_asprintf_add(struct smartlist_t *sl, const char *pattern, ...)
+smartlist_add_asprintf(struct smartlist_t *sl, const char *pattern, ...)
{
va_list ap;
va_start(ap, pattern);
- smartlist_vasprintf_add(sl, pattern, ap);
+ smartlist_add_vasprintf(sl, pattern, ap);
va_end(ap);
}
-/** va_list-based backend of smartlist_asprintf_add. */
+/** va_list-based backend of smartlist_add_asprintf. */
void
-smartlist_vasprintf_add(struct smartlist_t *sl, const char *pattern,
+smartlist_add_vasprintf(struct smartlist_t *sl, const char *pattern,
va_list args)
{
char *str = NULL;
diff --git a/src/common/util.h b/src/common/util.h
index cbc56d0..b15b1ea 100644
--- a/src/common/util.h
+++ b/src/common/util.h
@@ -218,9 +218,9 @@ int tor_sscanf(const char *buf, const char *pattern, ...)
#endif
;
-void smartlist_asprintf_add(struct smartlist_t *sl, const char *pattern, ...)
+void smartlist_add_asprintf(struct smartlist_t *sl, const char *pattern, ...)
CHECK_PRINTF(2, 3);
-void smartlist_vasprintf_add(struct smartlist_t *sl, const char *pattern,
+void smartlist_add_vasprintf(struct smartlist_t *sl, const char *pattern,
va_list args);
int hex_decode_digit(char c);
diff --git a/src/or/control.c b/src/or/control.c
index 60c62b1..a6b8e4f 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -4239,9 +4239,9 @@ control_event_conf_changed(smartlist_t *elements)
char *k = smartlist_get(elements, i);
char *v = smartlist_get(elements, i+1);
if (v == NULL) {
- smartlist_asprintf_add(lines, "650-%s", k);
+ smartlist_add_asprintf(lines, "650-%s", k);
} else {
- smartlist_asprintf_add(lines, "650-%s=%s", k, v);
+ smartlist_add_asprintf(lines, "650-%s=%s", k, v);
}
}
result = smartlist_join_strings(lines, "\r\n", 0, NULL);
More information about the tor-commits
mailing list