mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
Prevent collision with getline(3)
This commit is contained in:
parent
0002c7a75e
commit
c63bb1f245
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=415034
1 changed files with 24 additions and 0 deletions
24
net/wmlj/files/patch-src_network.c
Normal file
24
net/wmlj/files/patch-src_network.c
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
--- src/network.c.orig 2016-05-11 21:04:11 UTC
|
||||||
|
+++ src/network.c
|
||||||
|
@@ -72,7 +72,7 @@ skipline(char *text) {
|
||||||
|
}
|
||||||
|
|
||||||
|
static char*
|
||||||
|
-getline(char *text) {
|
||||||
|
+get_line(char *text) {
|
||||||
|
int len;
|
||||||
|
char *str;
|
||||||
|
|
||||||
|
@@ -113,10 +113,10 @@ parse_response(char *buf) {
|
||||||
|
int read_keys = 0;
|
||||||
|
|
||||||
|
while (*buf) {
|
||||||
|
- key = getline(buf);
|
||||||
|
+ key = get_line(buf);
|
||||||
|
buf = skipline(buf);
|
||||||
|
if (*buf) {
|
||||||
|
- val = getline(buf);
|
||||||
|
+ val = get_line(buf);
|
||||||
|
buf = skipline(buf);
|
||||||
|
|
||||||
|
g_hash_table_insert(hash, g_strdup(key), g_strdup(val));
|
Loading…
Add table
Reference in a new issue