summaryrefslogtreecommitdiff
path: root/util-linux/readprofile.c
diff options
context:
space:
mode:
authorDenis Vlasenko2007-11-13 17:51:40 +0000
committerDenis Vlasenko2007-11-13 17:51:40 +0000
commita89d50fb9addfe0060f697a7e1d31a7b3010b2bb (patch)
tree81b252e0f0a931b1485eaefd89e900859ec8fcfb /util-linux/readprofile.c
parent130f559f4dcb64fc7dbf55aebaf0def4f601ac2f (diff)
downloadbusybox-a89d50fb9addfe0060f697a7e1d31a7b3010b2bb.zip
busybox-a89d50fb9addfe0060f697a7e1d31a7b3010b2bb.tar.gz
tr: properly detect read errors (Fernando Silveira <fsilveira@gmail.com>)
readprofile: use xwrite function old new delta tr_main 679 677 -2 readprofile_main 1964 1944 -20
Diffstat (limited to 'util-linux/readprofile.c')
-rw-r--r--util-linux/readprofile.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/util-linux/readprofile.c b/util-linux/readprofile.c
index dbe7c71..c615255 100644
--- a/util-linux/readprofile.c
+++ b/util-linux/readprofile.c
@@ -88,10 +88,7 @@ int readprofile_main(int argc, char **argv)
}
fd = xopen(defaultpro, O_WRONLY);
-
- if (full_write(fd, &multiplier, to_write) != to_write)
- bb_perror_msg_and_die("error writing %s", defaultpro);
-
+ xwrite(fd, &multiplier, to_write);
close(fd);
return EXIT_SUCCESS;
}