Skip to content

Commit

Permalink
Being more explicit in the code
Browse files Browse the repository at this point in the history
- as requested by a code review
  • Loading branch information
kobliha committed Jan 3, 2013
1 parent 1de37b6 commit 419984e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions library/runlevel/src/Service.ycp
Expand Up @@ -208,9 +208,10 @@ global define boolean Adjust (string name, string action) {
boolean is_enabled = size (service["start"]:[]) != 0;

if (action == "disable") {
if (is_enabled) return serviceDisable (name, false);

return true;
if (is_enabled)
return serviceDisable (name, false);
else
return true;
} else if ((action == "default") || (action == "enable")) {
if (action == "enable" && is_enabled) {
// nothing to do
Expand Down

0 comments on commit 419984e

Please sign in to comment.