* fhandler.cc (fhandler_base::dup): Don't set handle on failure. Caller has

already taken care of that.
* fhandler_console.cc (fhandler_console::open): Initialize handles to NULL.
(fhandler_console::close): Ditto.  GNUify non-GNU formatted functions calls
throughout.
This commit is contained in:
Christopher Faylor
2002-09-22 03:38:57 +00:00
parent 228f6b6e07
commit c90e1cf179
43 changed files with 250 additions and 235 deletions

View File

@@ -153,7 +153,7 @@ read_etc_passwd ()
if (strlen (line))
add_pwd_line (line);
passwd_state.set_last_modified (pr.get_fhandle(), pr.get_fname ());
passwd_state.set_last_modified (pr.get_fhandle (), pr.get_fname ());
passwd_state = loaded;
pr.close ();
debug_printf ("Read /etc/passwd, %d lines", curr_lines);
@@ -179,9 +179,9 @@ read_etc_passwd ()
snprintf (linebuf, sizeof (linebuf),
"%s::%lu:%lu:%s:%s:/bin/sh",
cygheap->user.name (),
*GetSidSubAuthority(tu,
*GetSidSubAuthority (tu,
*GetSidSubAuthorityCount(tu) - 1),
*GetSidSubAuthority(tg,
*GetSidSubAuthority (tg,
*GetSidSubAuthorityCount(tg) - 1),
tu.string (strbuf), getenv ("HOME") ?: "/");
debug_printf ("Emulating /etc/passwd: %s", linebuf);
@@ -246,7 +246,7 @@ getpwuid32 (__uid32_t uid)
if (passwd_state <= initializing)
read_etc_passwd ();
pthread_testcancel();
pthread_testcancel ();
return search_for (uid, 0);
}
@@ -268,7 +268,7 @@ getpwuid_r32 (__uid32_t uid, struct passwd *pwd, char *buffer, size_t bufsize, s
if (passwd_state <= initializing)
read_etc_passwd ();
pthread_testcancel();
pthread_testcancel ();
struct passwd *temppw = search_for (uid, 0);
@@ -311,7 +311,7 @@ getpwnam (const char *name)
if (passwd_state <= initializing)
read_etc_passwd ();
pthread_testcancel();
pthread_testcancel ();
return search_for (0, name);
}
@@ -332,7 +332,7 @@ getpwnam_r (const char *nam, struct passwd *pwd, char *buffer, size_t bufsize, s
if (passwd_state <= initializing)
read_etc_passwd ();
pthread_testcancel();
pthread_testcancel ();
struct passwd *temppw = search_for (0, nam);