aboutsummaryrefslogtreecommitdiff
path: root/loginutils/deluser.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-10-26 23:25:17 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-10-26 23:25:17 +0000
commitddec5af6b0803c7434a1cc2fdee5cb9873fe6bd0 (patch)
treef4f2aa58fa669aed6e2c50bb7aa648a79ec1873d /loginutils/deluser.c
parentf0ed376eda5d5c25d270e5100a881fb2d801bee6 (diff)
downloadbusybox-w32-ddec5af6b0803c7434a1cc2fdee5cb9873fe6bd0.tar.gz
busybox-w32-ddec5af6b0803c7434a1cc2fdee5cb9873fe6bd0.tar.bz2
busybox-w32-ddec5af6b0803c7434a1cc2fdee5cb9873fe6bd0.zip
rename functions to more understandable names
Diffstat (limited to 'loginutils/deluser.c')
-rw-r--r--loginutils/deluser.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/loginutils/deluser.c b/loginutils/deluser.c
index bbbd77dbd..795dae49f 100644
--- a/loginutils/deluser.c
+++ b/loginutils/deluser.c
@@ -54,7 +54,7 @@ static void del_line_matching(const char *login, const char *filename)
54 struct stat statbuf; 54 struct stat statbuf;
55 55
56 56
57 if ((passwd = bb_wfopen(filename, "r"))) { 57 if ((passwd = fopen_or_warn(filename, "r"))) {
58 // Remove pointless const. 58 // Remove pointless const.
59 xstat((char *)filename, &statbuf); 59 xstat((char *)filename, &statbuf);
60 buffer = (char *) xmalloc(statbuf.st_size * sizeof(char)); 60 buffer = (char *) xmalloc(statbuf.st_size * sizeof(char));
@@ -64,7 +64,7 @@ static void del_line_matching(const char *login, const char *filename)
64 b = boundary(buffer, login); 64 b = boundary(buffer, login);
65 if (b.stop != 0) { 65 if (b.stop != 0) {
66 /* write the file w/o the user */ 66 /* write the file w/o the user */
67 if ((passwd = bb_wfopen(filename, "w"))) { 67 if ((passwd = fopen_or_warn(filename, "w"))) {
68 fwrite(buffer, (b.start - 1), sizeof(char), passwd); 68 fwrite(buffer, (b.start - 1), sizeof(char), passwd);
69 fwrite(&buffer[b.stop], (statbuf.st_size - b.stop), sizeof(char), passwd); 69 fwrite(&buffer[b.stop], (statbuf.st_size - b.stop), sizeof(char), passwd);
70 fclose(passwd); 70 fclose(passwd);