Removing compilation warnings in wrt-installer repo
[framework/web/wrt-installer.git] / src / jobs / widget_uninstall / task_uninstall_ospsvc.cpp
index 5d99a11..572b130 100644 (file)
@@ -64,7 +64,15 @@ void TaskUninstallOspsvc::StepUninstallOspsvc()
                  "Error occurs during\
                 uninstall osp service");
     }
-    fgets(readBuf, MAX_BUF_SIZE, fd);
+
+    if(fgets(readBuf, MAX_BUF_SIZE, fd) == NULL)
+    {
+        LogError("Failed to uninstalltion osp service\
+                        Inability of reading file.");
+        ThrowMsg(Exceptions::UninstallOspSvcFailed,
+                "Error occurs during\
+                uninstall osp service");
+    }
     LogDebug("return value : " << readBuf);
 
     int result = atoi(readBuf);