File: b64-fix-Wold-style-definition.patch

package info (click to toggle)
libscrypt 1.22-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 268 kB
  • sloc: ansic: 1,565; makefile: 144
file content (38 lines) | stat: -rw-r--r-- 1,008 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
From: Sam James <sam@gentoo.org>
Date: Wed, 27 Nov 2024 03:09:46 +0000
Subject: b64: fix -Wold-style-definition

Drop K&R decls. Most of the codebase uses ISO decls anyway.
---
 b64.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/b64.c b/b64.c
index b797dd0..4ebbd9a 100644
--- a/b64.c
+++ b/b64.c
@@ -120,11 +120,7 @@ static const char Pad64 = '=';
 */
 
 int
-libscrypt_b64_encode(src, srclength, target, targsize)
-	unsigned char const *src;
-	size_t srclength;
-	char *target;
-	size_t targsize;
+libscrypt_b64_encode(unsigned char const *src, size_t srclength, char *target, size_t targsize)
 {
 	size_t datalength = 0;
 	unsigned char input[3];
@@ -184,10 +180,7 @@ libscrypt_b64_encode(src, srclength, target, targsize)
  */
 
 int
-libscrypt_b64_decode(src, target, targsize)
-	char const *src;
-	unsigned char *target;
-	size_t targsize;
+libscrypt_b64_decode(char const *src, unsigned char *target, size_t targsize)
 {
 	int state, ch;
     unsigned int tarindex;