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

Commit766f7fd

Browse files
committed
Add "break"s to make it clearer what will happen in a nested switch.
This could only matter if the guessed_type variable had a value that wasn'ta member of the PasswordType enum; but just in case, let's be sure thatcontrol falls out to reach the elog(ERROR) at the end of the function.Per gripe from Coverity.
1 parent835cc11 commit766f7fd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎src/backend/libpq/crypt.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ encrypt_password(PasswordType target_type, const char *role,
162162
casePASSWORD_TYPE_MD5:
163163
returnpstrdup(password);
164164
}
165+
break;
165166

166167
casePASSWORD_TYPE_SCRAM:
167168
switch (guessed_type)
@@ -178,6 +179,7 @@ encrypt_password(PasswordType target_type, const char *role,
178179
casePASSWORD_TYPE_SCRAM:
179180
returnpstrdup(password);
180181
}
182+
break;
181183
}
182184

183185
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp