Stylecheck. Unused/commented out code. 54/49654/3
authorTomasz Iwanek <t.iwanek@samsung.com>
Fri, 16 Oct 2015 12:12:33 +0000 (14:12 +0200)
committerTomasz Iwanek <t.iwanek@samsung.com>
Fri, 16 Oct 2015 12:18:17 +0000 (14:18 +0200)
Change-Id: I85782fe902563df1992fdcc4c16dcb7d153537d3

src/common/step/step_privilege_compatibility.cc
src/pkgdir_maker/pkgdir_maker.cc

index 189063c..b1eb396 100644 (file)
@@ -10,6 +10,7 @@
 #include <cstdlib>
 #include <cstring>
 #include <memory>
+#include <string>
 
 #include "common/utils/clist_helpers.h"
 
@@ -129,7 +130,7 @@ Step::Status StepPrivilegeCompatibility::precheck() {
 Step::Status StepPrivilegeCompatibility::process() {
   // Add default privileges for each certificates level.
   bool ret = true;
-  switch(context_->privilege_level.get()) {
+  switch (context_->privilege_level.get()) {
     case common_installer::PrivilegeLevel::PUBLIC:
       ret = AddPrivilegeToList(context_->manifest_data.get(),
                                kPrivForPublic);
index 6c63328..d87e2e4 100644 (file)
 
 #define BUFSIZE 1024
 
-void printUID() {
-  struct passwd *lpwd;
-  lpwd = getpwuid(getuid());
-  printf("Process UID:%d, Uname:%s\n", getuid(), lpwd->pw_name);
-  lpwd = getpwuid(geteuid());
-  printf("Process EUID:%d, EUname:%s\n", geteuid(), lpwd->pw_name);
-}
-
 int main(int argc, char** argv) {
-  char cmd[BUFSIZE] = {0,};
-  char tmp[BUFSIZE] = {0,};
+  char cmd[BUFSIZE] = {0, };
+  char tmp[BUFSIZE] = {0, };
   int i;
 
-  //snprintf(cmd, BUFSIZE, "%s/pkgdir_maker_impl.sh", dirname(argv[0]));
   snprintf(cmd, BUFSIZE, "pkgdir_maker_impl.sh");
 
   for (i=1; i < argc; i++) {
@@ -55,8 +46,6 @@ int main(int argc, char** argv) {
   //       this routine is needed.
   setuid(0);
   seteuid(0);
-//  printUID();
 
-//  printf("CMD: %s\n", cmd);
   return system(cmd);
 }