aboutsummaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/cut.c2
-rw-r--r--coreutils/md5_sha1_sum.c2
-rw-r--r--coreutils/sort.c4
-rw-r--r--coreutils/uniq.c2
-rw-r--r--coreutils/uudecode.c4
5 files changed, 7 insertions, 7 deletions
diff --git a/coreutils/cut.c b/coreutils/cut.c
index 94e12e609..5dc35434f 100644
--- a/coreutils/cut.c
+++ b/coreutils/cut.c
@@ -50,7 +50,7 @@ static void cut_file(FILE * file)
50 unsigned int linenum = 0; /* keep these zero-based to be consistent */ 50 unsigned int linenum = 0; /* keep these zero-based to be consistent */
51 51
52 /* go through every line in the file */ 52 /* go through every line in the file */
53 while ((line = bb_get_chomped_line_from_file(file)) != NULL) { 53 while ((line = xmalloc_getline(file)) != NULL) {
54 54
55 /* set up a list so we can keep track of what's been printed */ 55 /* set up a list so we can keep track of what's been printed */
56 char * printed = xzalloc(strlen(line) * sizeof(char)); 56 char * printed = xzalloc(strlen(line) * sizeof(char));
diff --git a/coreutils/md5_sha1_sum.c b/coreutils/md5_sha1_sum.c
index a99e45864..ca23d8ac4 100644
--- a/coreutils/md5_sha1_sum.c
+++ b/coreutils/md5_sha1_sum.c
@@ -126,7 +126,7 @@ int md5_sha1_sum_main(int argc, char **argv)
126 pre_computed_stream = xfopen(file_ptr, "r"); 126 pre_computed_stream = xfopen(file_ptr, "r");
127 } 127 }
128 128
129 while ((line = bb_get_chomped_line_from_file(pre_computed_stream)) != NULL) { 129 while ((line = xmalloc_getline(pre_computed_stream)) != NULL) {
130 char *filename_ptr; 130 char *filename_ptr;
131 131
132 count_total++; 132 count_total++;
diff --git a/coreutils/sort.c b/coreutils/sort.c
index e789292b9..c23c14226 100644
--- a/coreutils/sort.c
+++ b/coreutils/sort.c
@@ -124,9 +124,9 @@ static struct sort_key *add_key(void)
124} 124}
125 125
126#define GET_LINE(fp) (global_flags&FLAG_z) ? bb_get_chunk_from_file(fp,NULL) \ 126#define GET_LINE(fp) (global_flags&FLAG_z) ? bb_get_chunk_from_file(fp,NULL) \
127 : bb_get_chomped_line_from_file(fp) 127 : xmalloc_getline(fp)
128#else 128#else
129#define GET_LINE(fp) bb_get_chomped_line_from_file(fp) 129#define GET_LINE(fp) xmalloc_getline(fp)
130#endif 130#endif
131 131
132/* Iterate through keys list and perform comparisons */ 132/* Iterate through keys list and perform comparisons */
diff --git a/coreutils/uniq.c b/coreutils/uniq.c
index 1b201af24..a7b7a8e07 100644
--- a/coreutils/uniq.c
+++ b/coreutils/uniq.c
@@ -69,7 +69,7 @@ int uniq_main(int argc, char **argv)
69 dups = 0; 69 dups = 0;
70 70
71 /* gnu uniq ignores newlines */ 71 /* gnu uniq ignores newlines */
72 while ((s1 = bb_get_chomped_line_from_file(in)) != NULL) { 72 while ((s1 = xmalloc_getline(in)) != NULL) {
73 e1 = s1; 73 e1 = s1;
74 for (i=skip_fields ; i ; i--) { 74 for (i=skip_fields ; i ; i--) {
75 e1 = skip_whitespace(e1); 75 e1 = skip_whitespace(e1);
diff --git a/coreutils/uudecode.c b/coreutils/uudecode.c
index 921d29af0..c8152a808 100644
--- a/coreutils/uudecode.c
+++ b/coreutils/uudecode.c
@@ -18,7 +18,7 @@ static int read_stduu(FILE *src_stream, FILE *dst_stream)
18{ 18{
19 char *line; 19 char *line;
20 20
21 while ((line = bb_get_chomped_line_from_file(src_stream)) != NULL) { 21 while ((line = xmalloc_getline(src_stream)) != NULL) {
22 int length; 22 int length;
23 char *line_ptr = line; 23 char *line_ptr = line;
24 24
@@ -140,7 +140,7 @@ int uudecode_main(int argc, char **argv)
140 } 140 }
141 141
142 /* Search for the start of the encoding */ 142 /* Search for the start of the encoding */
143 while ((line = bb_get_chomped_line_from_file(src_stream)) != NULL) { 143 while ((line = xmalloc_getline(src_stream)) != NULL) {
144 int (*decode_fn_ptr)(FILE * src, FILE * dst); 144 int (*decode_fn_ptr)(FILE * src, FILE * dst);
145 char *line_ptr; 145 char *line_ptr;
146 FILE *dst_stream; 146 FILE *dst_stream;