summaryrefslogtreecommitdiff
path: root/databases/kldap/patches/patch-src_ber.cpp
blob: 35b20914f5e7075972ec6c3c0520fa0e3cd5d8f9 (plain)
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
39
40
41
42
43
44
$NetBSD: patch-src_ber.cpp,v 1.3 2022/09/29 00:26:00 markd Exp $

--- src/core/ber.cpp.orig	2022-08-05 11:31:27.000000000 +0000
+++ src/core/ber.cpp
@@ -110,7 +110,7 @@ QByteArray Ber::flatten() const
     return ret;
 }
 
-int Ber::printf(QString format, ...)
+int Ber::printf(const char *format, ...)
 {
     char fmt[2];
     va_list args;
@@ -119,8 +119,8 @@ int Ber::printf(QString format, ...)
 
     int i = 0;
     int ret = 0;
-    while (i < format.length()) {
-        fmt[0] = format[i].toLatin1();
+    while (format[i]) {
+        fmt[0] = format[i];
         i++;
         switch (fmt[0]) {
         case 'b':
@@ -206,7 +206,7 @@ int Ber::printf(QString format, ...)
     return ret;
 }
 
-int Ber::scanf(QString format, ...)
+int Ber::scanf(const char *format, ...)
 {
     char fmt[2];
     va_list args;
@@ -215,8 +215,8 @@ int Ber::scanf(QString format, ...)
 
     int i = 0;
     int ret = 0;
-    while (i < format.length()) {
-        fmt[0] = format[i].toLatin1();
+    while (format[i]) {
+        fmt[0] = format[i];
         i++;
         switch (fmt[0]) {
         case 'l':