Skip to content

Commit

Permalink
Include string.h for strcmp, fix not keyword var.
Browse files Browse the repository at this point in the history
  • Loading branch information
tqh committed Jul 23, 2015
1 parent 35059a5 commit c0958d1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/servers/launch/SettingsParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Distributed under the terms of the MIT License.
*/

#include <string.h>

#include "SettingsParser.h"

Expand Down Expand Up @@ -54,15 +55,15 @@ class ConditionConverter : public AbstractArgsConverter {
return B_OK;

BMessage* add = &target;
bool not = parameter.value_count > 1
bool notExpr = parameter.value_count > 1
&& strcmp(parameter.values[0], "not") == 0;
if (not) {
if (notExpr) {
add = &message;
index++;
}

status_t status = AddSubMessage(parameter, index, *add);
if (status == B_OK && not)
if (status == B_OK && notExpr)
status = target.AddMessage("not", &message);

return status;
Expand Down

0 comments on commit c0958d1

Please sign in to comment.