Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 227652
b: refs/heads/master
c: 96aebaf
h: refs/heads/master
v: v3
  • Loading branch information
Jesper Juhl authored and Michal Marek committed Dec 29, 2010
1 parent 1233226 commit 30c9491
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 731ece41fb1047816303295a0cdfed90a528137e
refs/heads/master: 96aebafa63418f447ddc823e40da341cc40553dd
12 changes: 6 additions & 6 deletions trunk/usr/gen_init_cpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,18 +309,18 @@ static int cpio_mkfile(const char *name, const char *location,

mode |= S_IFREG;

retval = stat (location, &buf);
if (retval) {
fprintf (stderr, "File %s could not be located\n", location);
goto error;
}

file = open (location, O_RDONLY);
if (file < 0) {
fprintf (stderr, "File %s could not be opened for reading\n", location);
goto error;
}

retval = fstat (file, &buf);
if (retval) {
fprintf (stderr, "File %s could not be stat()'ed\n", location);
goto error;
}

filebuf = malloc(buf.st_size);
if (!filebuf) {
fprintf (stderr, "out of memory\n");
Expand Down

0 comments on commit 30c9491

Please sign in to comment.