aboutsummaryrefslogtreecommitdiffstats
path: root/chinese
diff options
context:
space:
mode:
authorscheidell <scheidell@FreeBSD.org>2012-07-03 20:08:06 +0800
committerscheidell <scheidell@FreeBSD.org>2012-07-03 20:08:06 +0800
commit24a4a32c60917c48d326b90bbd5005ea9a3a11de (patch)
tree65f29fa1f2fc046b868909d952dd3474e7052237 /chinese
parented8cd6b710d9fe6d726e82f324432d092b537e36 (diff)
downloadfreebsd-ports-gnome-24a4a32c60917c48d326b90bbd5005ea9a3a11de.tar.gz
freebsd-ports-gnome-24a4a32c60917c48d326b90bbd5005ea9a3a11de.tar.zst
freebsd-ports-gnome-24a4a32c60917c48d326b90bbd5005ea9a3a11de.zip
- Unbreak on i386 on 7.x
PR: ports/169151 Submitted by: Zhihao Yuan <lichray@gmail.com> (maintainer) Reported by: scheidell@ (me)
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') {