Fix check for PROC_QUOTES mode

Since != has priority over &, the "if ((mode&PROC_QUOTES != 0))" check
is the same as "if (mode & (PROC_QUOTES!=0))" - not what the code
intends.

Change-Id: I14840a887f26c28f2bd0aee8704c79cf353164ad
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
This commit is contained in:
Bernhard Rosenkränzer
2014-11-17 22:30:56 +01:00
parent 52e2b6f79d
commit 3b1e22e289

View File

@@ -719,7 +719,7 @@ jboolean android_os_Process_parseProcLineArray(JNIEnv* env, jobject clazz,
jint mode = formatData[fi];
if ((mode&PROC_PARENS) != 0) {
i++;
} else if ((mode&PROC_QUOTES != 0)) {
} else if ((mode&PROC_QUOTES) != 0) {
if (buffer[i] == '"') {
i++;
} else {