]> granicus.if.org Git - icinga2/commitdiff
Remove redundant check
authorGunnar Beutner <gunnar.beutner@icinga.com>
Thu, 16 Mar 2017 08:46:31 +0000 (09:46 +0100)
committerGunnar Beutner <gunnar.beutner@icinga.com>
Thu, 16 Mar 2017 12:58:35 +0000 (13:58 +0100)
refs #4991

lib/redis/rediswriter-config.cpp

index 695f8de3c9ced9b4b1252a68027a300e9df8af79..56d17a5672c112d0d71141c1c0eca0dd781503e0 100644 (file)
@@ -111,12 +111,11 @@ void RedisWriter::UpdateAllConfigObjects(void)
 
                /* fetch all objects and dump them */
                ConfigType *ctype = dynamic_cast<ConfigType *>(type.get());
+               VERIFY(ctype);
 
-               if (ctype) {
-                       for (const ConfigObject::Ptr& object : ctype->GetObjects()) {
-                               SendConfigUpdate(object, typeName);
-                               SendStatusUpdate(object, typeName);
-                       }
+               for (const ConfigObject::Ptr& object : ctype->GetObjects()) {
+                       SendConfigUpdate(object, typeName);
+                       SendStatusUpdate(object, typeName);
                }
        }
 }
@@ -195,8 +194,7 @@ Dictionary::Ptr RedisWriter::SerializeObjectAttrs(const Object::Ptr& object, int
 
        Dictionary::Ptr resultAttrs = new Dictionary();
 
-       for (int& fid : fids)
-       {
+       for (int& fid : fids) {
                Field field = type->GetFieldInfo(fid);
 
                if ((field.Attributes & fieldType) == 0)