[Asterisk-code-review] test.c: Make output jUnit compatible (asterisk[13])

Richard Mudgett asteriskteam at digium.com
Fri Jul 6 11:54:23 CDT 2018


Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/9361 )

Change subject: test.c:  Make output jUnit compatible
......................................................................


Patch Set 1: Code-Review-1

(7 comments)

https://gerrit.asterisk.org/#/c/9361/1/main/test.c
File main/test.c:

https://gerrit.asterisk.org/#/c/9361/1/main/test.c@272
PS1, Line 272: static char *reserved_words[] = {
A comment saying which language's reserved words we are listing would be helpful.


https://gerrit.asterisk.org/#/c/9361/1/main/test.c@285
PS1, Line 285: static int is_reserved_word(const char *word) {
Curly location.
int foo(void)
{
   return 0;
}


https://gerrit.asterisk.org/#/c/9361/1/main/test.c@300
PS1, Line 300: 	char *tmp_cat = ast_strdupa(test->info.category + 1);
Instead of tmp_cat and tmp_name, how about test_cat and test_name?


https://gerrit.asterisk.org/#/c/9361/1/main/test.c@301
PS1, Line 301: 	char *next_cat = NULL;
Initializing to NULL is not necessary since the first use is initializing it.


https://gerrit.asterisk.org/#/c/9361/1/main/test.c@303
PS1, Line 303: 	struct ast_str *category = ast_str_create(strlen(test->info.category) + 32);
category is never freed


https://gerrit.asterisk.org/#/c/9361/1/main/test.c@305
PS1, Line 305: 	if (!category || !f || !test || test->state == AST_TEST_NOT_RUN) {
We are testing test for NULL after we have already dereferenced it when initializing the above variables.


https://gerrit.asterisk.org/#/c/9361/1/main/test.c@309
PS1, Line 309: 	while((next_cat = ast_strsep(&tmp_cat, '/', AST_STRSEP_TRIM))) {
space after wile



-- 
To view, visit https://gerrit.asterisk.org/9361
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: comment
Gerrit-Change-Id: Iec1a985eba1c478e5c1d65d5dfd95cb708442099
Gerrit-Change-Number: 9361
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Fri, 06 Jul 2018 16:54:23 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180706/559d6207/attachment-0001.html>


More information about the asterisk-code-review mailing list