summaryrefslogtreecommitdiff
path: root/chinese
diff options
context:
space:
mode:
authorMichael Scheidell <scheidell@FreeBSD.org>2012-07-03 12:08:06 +0000
committerMichael Scheidell <scheidell@FreeBSD.org>2012-07-03 12:08:06 +0000
commit83691957f194423b57caeb0757c8766bb019bb3c (patch)
treee177d8ef58ff9780f9158c2a662fa68494a79ddf /chinese
parent- Force commit to note repocopy from databases/postgresql-libpqxx30. (diff)
- Unbreak on i386 on 7.x
PR: ports/169151 Submitted by: Zhihao Yuan <lichray@gmail.com> (maintainer) Reported by: scheidell@ (me)
Notes
Notes: svn path=/head/; revision=300432
Diffstat (limited to 'chinese')
-rw-r--r--chinese/fcitx/files/getline-src_lib_fcitx-utils_utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/chinese/fcitx/files/getline-src_lib_fcitx-utils_utils.c b/chinese/fcitx/files/getline-src_lib_fcitx-utils_utils.c
index cf1b1dc91236..de6af574f7c6 100644
--- a/chinese/fcitx/files/getline-src_lib_fcitx-utils_utils.c
+++ b/chinese/fcitx/files/getline-src_lib_fcitx-utils_utils.c
@@ -7,8 +7,8 @@
+FCITX_EXPORT_API
+ssize_t getline(char ** p, size_t * cap, FILE * fp) {
+ ssize_t l;
-+ if (!*cap && (*p = malloc(128))) *cap = 128;
-+ else if (!*p) return -1;
++ if ((!*cap || !*p) && (*p = malloc(128))) *cap = 128;
++ if (!*p) return -1;
+ fgets(*p, *cap, fp);
+ l = strlen(*p);
+ while (!feof(fp) && (*p)[l - 1] != '\n') {