Skip to content

Commit 64a3ee3

Browse files
committed
code style
1 parent e419464 commit 64a3ee3

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

include/qlibc/containers/qtreetbl.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,9 @@ extern qtreetbl_t *qtreetbl(int options); /*!< qtreetbl constructor */
6161
* - tbl->put(tbl, ...); // easier to switch the container type to other kinds.
6262
* - qtreetbl_put(tbl, ...); // where avoiding pointer overhead is preferred.
6363
*/
64-
extern void qtreetbl_set_compare(
65-
qtreetbl_t *tbl,
66-
int (*cmp)(const void *name1, size_t namesize1, const void *name2,
67-
size_t namesize2));
64+
extern void qtreetbl_set_compare(qtreetbl_t *tbl,
65+
int (*cmp)(const void *name1, size_t namesize1,
66+
const void *name2, size_t namesize2));
6867

6968
extern bool qtreetbl_put(qtreetbl_t *tbl, const char *name, const void *data,
7069
size_t datasize);

src/containers/qtreetbl.c

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,7 @@ void qtreetbl_set_compare(qtreetbl_t *tbl,
269269
bool qtreetbl_put(qtreetbl_t *tbl, const char *name, const void *data,
270270
size_t datasize) {
271271
return qtreetbl_putobj(tbl,
272-
name, (name != NULL) ? (strlen(name) + 1) : 0,
273-
data, datasize);
272+
name, (name != NULL) ? (strlen(name) + 1) : 0, data, datasize);
274273
}
275274

276275
/**
@@ -287,8 +286,8 @@ bool qtreetbl_put(qtreetbl_t *tbl, const char *name, const void *data,
287286
*/
288287
bool qtreetbl_putstr(qtreetbl_t *tbl, const char *name, const char *str) {
289288
return qtreetbl_putobj(tbl,
290-
name, (name != NULL) ? (strlen(name) + 1) : 0,
291-
str, (str != NULL) ? (strlen(str) + 1) : 0);
289+
name, (name != NULL) ? (strlen(name) + 1) : 0,
290+
str, (str != NULL) ? (strlen(str) + 1) : 0);
292291
}
293292

294293
/**
@@ -393,8 +392,7 @@ bool qtreetbl_putobj(qtreetbl_t *tbl, const void *name, size_t namesize,
393392
void *qtreetbl_get(qtreetbl_t *tbl, const char *name, size_t *datasize,
394393
bool newmem) {
395394
return qtreetbl_getobj(tbl,
396-
name, (name != NULL) ? (strlen(name) + 1) : 0,
397-
datasize, newmem);
395+
name, (name != NULL) ? (strlen(name) + 1) : 0, datasize, newmem);
398396
}
399397

400398
/**
@@ -418,8 +416,7 @@ void *qtreetbl_get(qtreetbl_t *tbl, const char *name, size_t *datasize,
418416
*/
419417
char *qtreetbl_getstr(qtreetbl_t *tbl, const char *name, const bool newmem) {
420418
return qtreetbl_getobj(tbl,
421-
name, (name != NULL) ? (strlen(name) + 1) : 0,
422-
NULL, newmem);
419+
name, (name != NULL) ? (strlen(name) + 1) : 0, NULL, newmem);
423420
}
424421

425422
/**
@@ -1307,7 +1304,7 @@ static void free_objs(qtreetbl_obj_t *obj) {
13071304
if (obj == NULL) {
13081305
return;
13091306
}
1310-
1307+
13111308
free_objs(obj->left);
13121309
free_objs(obj->right);
13131310

0 commit comments

Comments
 (0)