1 |
vapier 11/03/02 07:55:57 |
2 |
|
3 |
Modified: main.c |
4 |
Log: |
5 |
make sure new eat_file_at helper always sets up buf |
6 |
|
7 |
Revision Changes Path |
8 |
1.189 portage-utils/main.c |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/portage-utils/main.c?rev=1.189&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-projects/portage-utils/main.c?rev=1.189&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/portage-utils/main.c?r1=1.188&r2=1.189 |
13 |
|
14 |
Index: main.c |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-projects/portage-utils/main.c,v |
17 |
retrieving revision 1.188 |
18 |
retrieving revision 1.189 |
19 |
diff -u -r1.188 -r1.189 |
20 |
--- main.c 2 Mar 2011 05:31:46 -0000 1.188 |
21 |
+++ main.c 2 Mar 2011 07:55:57 -0000 1.189 |
22 |
@@ -1,7 +1,7 @@ |
23 |
/* |
24 |
* Copyright 2005-2008 Gentoo Foundation |
25 |
* Distributed under the terms of the GNU General Public License v2 |
26 |
- * $Header: /var/cvsroot/gentoo-projects/portage-utils/main.c,v 1.188 2011/03/02 05:31:46 vapier Exp $ |
27 |
+ * $Header: /var/cvsroot/gentoo-projects/portage-utils/main.c,v 1.189 2011/03/02 07:55:57 vapier Exp $ |
28 |
* |
29 |
* Copyright 2005-2008 Ned Ludd - <solar@g.o> |
30 |
* Copyright 2005-2008 Mike Frysinger - <vapier@g.o> |
31 |
@@ -204,8 +204,10 @@ |
32 |
int fd; |
33 |
char ret; |
34 |
|
35 |
- if ((fd = openat(dfd, file, O_RDONLY)) == -1) |
36 |
+ if ((fd = openat(dfd, file, O_RDONLY)) == -1) { |
37 |
+ buf[0] = '\0'; |
38 |
return 0; |
39 |
+ } |
40 |
|
41 |
ret = eat_file_fd(fd, buf, bufsize); |