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

Appearance settings

Commit 9435fbf

Browse filesBrowse files
tniessendanielleadams
authored andcommitted
src: remove dead code in base64_encode
If mode == Base64Mode::NORMAL, then the function has already returned. Refs: #39775 PR-URL: #43979 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Feng Yu <F3n67u@outlook.com>
1 parent bfe0ac6 commit 9435fbf
Copy full SHA for 9435fbf

File tree

Expand file treeCollapse file tree

1 file changed

+0
-6
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+0
-6
lines changed
Open diff view settings
Collapse file

‎src/base64-inl.h‎

Copy file name to clipboardExpand all lines: src/base64-inl.h
-6Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -169,19 +169,13 @@ inline size_t base64_encode(const char* src,
169169
a = src[i + 0] & 0xff;
170170
dst[k + 0] = table[a >> 2];
171171
dst[k + 1] = table[(a & 3) << 4];
172-
if (mode == Base64Mode::NORMAL) {
173-
dst[k + 2] = '=';
174-
dst[k + 3] = '=';
175-
}
176172
break;
177173
case 2:
178174
a = src[i + 0] & 0xff;
179175
b = src[i + 1] & 0xff;
180176
dst[k + 0] = table[a >> 2];
181177
dst[k + 1] = table[((a & 3) << 4) | (b >> 4)];
182178
dst[k + 2] = table[(b & 0x0f) << 2];
183-
if (mode == Base64Mode::NORMAL)
184-
dst[k + 3] = '=';
185179
break;
186180
}
187181

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.