dovecot-2.2: lib: cosmetic - rename parameters so that .h and .c...
dovecot at dovecot.org
dovecot at dovecot.org
Thu May 8 11:26:10 UTC 2014
details: http://hg.dovecot.org/dovecot-2.2/rev/de99b926a9ad
changeset: 17355:de99b926a9ad
user: Phil Carmody <phil at dovecot.fi>
date: Tue May 06 12:44:38 2014 +0300
description:
lib: cosmetic - rename parameters so that .h and .c files match
These functions were flagging sparse warnings, but those warnings are
trivially (robotically) dismissable if the parameters are identically
named in the two contexts. Opted for whichever name seemed to be more
meaningful or sensible. e.g. char** became p rather than s, as it's
a pointer more than a string.
diffstat:
src/lib/strfuncs.c | 8 ++++----
src/lib/strfuncs.h | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diffs (39 lines):
diff -r c31bd0065d91 -r de99b926a9ad src/lib/strfuncs.c
--- a/src/lib/strfuncs.c Thu May 08 11:20:36 2014 +0300
+++ b/src/lib/strfuncs.c Tue May 06 12:44:38 2014 +0300
@@ -366,9 +366,9 @@
return strcmp(key, *member);
}
-int i_strcmp_p(const char *const *s1, const char *const *s2)
+int i_strcmp_p(const char *const *p1, const char *const *p2)
{
- return strcmp(*s1, *s2);
+ return strcmp(*p1, *p2);
}
int bsearch_strcasecmp(const char *key, const char *const *member)
@@ -376,9 +376,9 @@
return strcasecmp(key, *member);
}
-int i_strcasecmp_p(const char *const *s1, const char *const *s2)
+int i_strcasecmp_p(const char *const *p1, const char *const *p2)
{
- return strcasecmp(*s1, *s2);
+ return strcasecmp(*p1, *p2);
}
static char **
diff -r c31bd0065d91 -r de99b926a9ad src/lib/strfuncs.h
--- a/src/lib/strfuncs.h Thu May 08 11:20:36 2014 +0300
+++ b/src/lib/strfuncs.h Tue May 06 12:44:38 2014 +0300
@@ -50,7 +50,7 @@
const char *t_str_ucase(const char *str);
int null_strcmp(const char *s1, const char *s2) ATTR_PURE;
-int bsearch_strcmp(const char *p1, const char *const *member) ATTR_PURE;
+int bsearch_strcmp(const char *key, const char *const *member) ATTR_PURE;
int bsearch_strcasecmp(const char *key, const char *const *member) ATTR_PURE;
int i_memcasecmp(const void *p1, const void *p2, size_t size) ATTR_PURE;
int i_strcmp_p(const char *const *p1, const char *const *p2) ATTR_PURE;
More information about the dovecot-cvs
mailing list