Skip to content

Commit

Permalink
MFC: Parameter names of pointers to comparison functions:
Browse files Browse the repository at this point in the history
'a', 'b' -> 'lhs', 'rhs'.

merge from 35ce961 in master
  • Loading branch information
IepIweidieng authored and holishing committed Nov 20, 2018
1 parent f3c22b2 commit 9d2ce9a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion include/dao.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ int rec_append(char *fpath, void *data, int size);
/* splay.c */
SplayNode *splay_in(SplayNode *top, void *data, int (*compare)(void *lhs, void *rhs));
/* xsort.c */
void xsort(void *a, size_t n, size_t es, int (*cmp)(void *a, void *b));
void xsort(void *a, size_t n, size_t es, int (*cmp)(void *lhs, void *rhs));
/* attr_lib.c */
int attr_get(char *userid, int key, void *value);
int attr_put(char *userid, int key, void *value);
Expand Down
4 changes: 2 additions & 2 deletions lib/xsort.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ med3(
char* a,
char* b,
char* c,
int (*cmp) (void *a, void *b)
int (*cmp) (void *lhs, void *rhs)
)
{
return cmp(a, b) < 0 ?
Expand All @@ -64,7 +64,7 @@ xsort(
void *a,
size_t n,
size_t es,
int (*cmp) (void *a, void *b)
int (*cmp) (void *lhs, void *rhs)
)
{
char *pa, *pb, *pc, *pd, *pl, *pm, *pn;
Expand Down
2 changes: 1 addition & 1 deletion so/innbbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ a_innbbs(void)
char *fpath;
char buf[40];
void (*item_func)(int num, void *obj), (*query_func)(void *obj);
int (*add_func)(char *fpath, void *old, int pos), (*sync_func)(void *a, void *b), (*search_func)(void *obj, char *key);
int (*add_func)(char *fpath, void *old, int pos), (*sync_func)(void *lhs, void *rhs), (*search_func)(void *obj, char *key);

vs_bar("轉信設定");
more("etc/innbbs.hlp", (char *) -1);
Expand Down
4 changes: 2 additions & 2 deletions util/tranBRD.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ main(

if (count > 1)
{
qsort(table, count, sizeof(life), (int (*)(const void *a, const void *b))strcasecmp);
qsort(table, count, sizeof(life), (int (*)(const void *lhs, const void *rhs))strcasecmp);
}


Expand All @@ -132,7 +132,7 @@ main(
memset(&brd,0,sizeof(BRD));
memcpy(&brd,&old,sizeof(BRDOLD));

key = (life *) bsearch(brd.brdname, table, count, sizeof(life), (int (*)(const void *a, const void *b))strcasecmp);
key = (life *) bsearch(brd.brdname, table, count, sizeof(life), (int (*)(const void *lhs, const void *rhs))strcasecmp);
if(key)
{
brd.expiremax = key->maxp;
Expand Down

0 comments on commit 9d2ce9a

Please sign in to comment.