Fix dinitctl add/remove dependency
authorDavin McCall <davmac@davmac.org>
Sun, 21 Jun 2020 07:36:38 +0000 (17:36 +1000)
committerDavin McCall <davmac@davmac.org>
Sun, 21 Jun 2020 07:36:38 +0000 (17:36 +1000)
src/dinitctl.cc

index 3542e566f7bb042b85dc37a85c83fb6db9e9f8e1..b884be31aa57afa830d6d155d0a78eb835d18b87 100644 (file)
@@ -980,7 +980,7 @@ static int add_remove_dependency(int socknum, cpbuffer_t &rbuffer, bool add,
 
     auto m = membuf()
             .append<char>(add ? (char)DINIT_CP_ADD_DEP : (char)DINIT_CP_REM_DEP)
-            .append(dep_type)
+            .append(static_cast<char>(dep_type))
             .append(from_handle)
             .append(to_handle);
     write_all_x(socknum, m);