[BusyBox-cvs] busybox/archival dpkg.c,1.70,1.71
Glenn McGrath
bug1 at busybox.net
Wed Dec 11 03:10:17 UTC 2002
- Previous message: [BusyBox-cvs] busybox/debian busybox-cvs-static.manpages,NONE,1.1 busybox-cvs.manpages,NONE,1.1 changelog,1.29,1.30 config-udeb,1.5,1.6 control,1.14,1.15 rules,1.20,1.21
- Next message: [BusyBox-cvs] busybox/libpwdgrp getpwuid.c,1.3,1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/cvs/busybox/archival
In directory winder:/tmp/cvs-serv8977/archival
Modified Files:
dpkg.c
Log Message:
Use libbb/get_line_from_file instead of getline
Index: dpkg.c
===================================================================
RCS file: /var/cvs/busybox/archival/dpkg.c,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -d -r1.70 -r1.71
--- dpkg.c 8 Dec 2002 00:54:29 -0000 1.70
+++ dpkg.c 11 Dec 2002 03:10:13 -0000 1.71
@@ -1057,7 +1057,6 @@
FILE *list_stream;
char **file_list = NULL;
char *line = NULL;
- int length = 0;
int count = 0;
/* dont use [xw]fopen here, handle error ourself */
@@ -1066,14 +1065,13 @@
return(NULL);
}
- while (getline(&line, &length, list_stream) != -1) {
+ while ((line = get_line_from_file(list_stream)) != NULL) {
file_list = xrealloc(file_list, sizeof(char *) * (count + 2));
chomp(line);
- file_list[count] = xstrdup(line);
+ file_list[count] = line;
count++;
}
fclose(list_stream);
- free(line);
if (count == 0) {
return(NULL);
- Previous message: [BusyBox-cvs] busybox/debian busybox-cvs-static.manpages,NONE,1.1 busybox-cvs.manpages,NONE,1.1 changelog,1.29,1.30 config-udeb,1.5,1.6 control,1.14,1.15 rules,1.20,1.21
- Next message: [BusyBox-cvs] busybox/libpwdgrp getpwuid.c,1.3,1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the busybox-cvs
mailing list