]> andersk Git - test.git/commitdiff
Avoid compiler warnings with some versions of GCC.
authorMarkus Gutschke <markus@shellinabox.com>
Thu, 4 Feb 2010 00:33:37 +0000 (00:33 +0000)
committerMarkus Gutschke <markus@shellinabox.com>
Thu, 4 Feb 2010 00:33:37 +0000 (00:33 +0000)
shellinabox/launcher.c

index 0bb2214fb22611e4f175836c2dd377746c540c5b..7c458509f341b48a57c7fe2582beb4f470a6e775 100644 (file)
@@ -696,7 +696,7 @@ static int forkPty(int *pty, int useLogin, struct Utmp **utmp,
     // Become the session/process-group leader
     setsid();
     setpgid(0, 0);
-    
+
     // Redirect standard I/O to the pty
     dup2(slave, 0);
     dup2(slave, 1);
@@ -736,11 +736,11 @@ static const struct passwd *getPWEnt(uid_t uid) {
   #endif
   check(buf                         = malloc(len));
   check(!getpwuid_r(uid, &pwbuf, buf, len, &pw) && pw);
-  if (!pw->pw_name  ) pw->pw_name   = "";
-  if (!pw->pw_passwd) pw->pw_passwd = "";
-  if (!pw->pw_gecos ) pw->pw_gecos  = "";
-  if (!pw->pw_dir   ) pw->pw_dir    = "";
-  if (!pw->pw_shell ) pw->pw_shell  = "";
+  if (!pw->pw_name  ) pw->pw_name   = (char *)"";
+  if (!pw->pw_passwd) pw->pw_passwd = (char *)"";
+  if (!pw->pw_gecos ) pw->pw_gecos  = (char *)"";
+  if (!pw->pw_dir   ) pw->pw_dir    = (char *)"";
+  if (!pw->pw_shell ) pw->pw_shell  = (char *)"";
   struct passwd *passwd;
   check(passwd                      = calloc(sizeof(struct passwd) +
                                              strlen(pw->pw_name) +
This page took 0.122081 seconds and 5 git commands to generate.