Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita2d75b6

Browse files
committed
Remove useless pg_strdup() operations.
split_to_stringlist() doesn't modify its first argument nor expect itto remain valid after exit, so there's no need to duplicate the optargstring at the call sites. Per Coverity. (This has been wrong all along,but commit052cc22 changed the useless calls from "strdup" to"pg_strdup", which apparently made Coverity think it's a new bug.It's not, but it's also not worth back-patching.)
1 parente21db14 commita2d75b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/test/regress/pg_regress.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2064,7 +2064,7 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
20642064
* before we add the specified one.
20652065
*/
20662066
free_stringlist(&dblist);
2067-
split_to_stringlist(pg_strdup(optarg),", ",&dblist);
2067+
split_to_stringlist(optarg,", ",&dblist);
20682068
break;
20692069
case2:
20702070
debug= true;
@@ -2114,7 +2114,7 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
21142114
dlpath=pg_strdup(optarg);
21152115
break;
21162116
case18:
2117-
split_to_stringlist(pg_strdup(optarg),", ",&extraroles);
2117+
split_to_stringlist(optarg,", ",&extraroles);
21182118
break;
21192119
case19:
21202120
add_stringlist_item(&temp_configs,optarg);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp