git-svn: trunk@1413
Nigel Horne authored on 2005/03/21 03:34:18... | ... |
@@ -21,6 +21,9 @@ |
21 | 21 |
* |
22 | 22 |
* Change History: |
23 | 23 |
* $Log: untar.c,v $ |
24 |
+ * Revision 1.24 2005/03/20 18:34:18 nigelhorne |
|
25 |
+ * Minor tidy |
|
26 |
+ * |
|
24 | 27 |
* Revision 1.23 2005/03/20 09:09:25 nigelhorne |
25 | 28 |
* Consolidate NAME_MAX |
26 | 29 |
* |
... | ... |
@@ -91,7 +94,7 @@ |
91 | 91 |
* First draft |
92 | 92 |
* |
93 | 93 |
*/ |
94 |
-static char const rcsid[] = "$Id: untar.c,v 1.23 2005/03/20 09:09:25 nigelhorne Exp $"; |
|
94 |
+static char const rcsid[] = "$Id: untar.c,v 1.24 2005/03/20 18:34:18 nigelhorne Exp $"; |
|
95 | 95 |
|
96 | 96 |
#include <stdio.h> |
97 | 97 |
#include <errno.h> |
... | ... |
@@ -271,7 +274,7 @@ cli_untar(const char *dir, int desc) |
271 | 271 |
cli_dbgmsg("cli_untar: size = %d\n", size); |
272 | 272 |
} else { /* write or continue writing file contents */ |
273 | 273 |
const int nbytes = size>512? 512:size; |
274 |
- const int nwritten = fwrite(block, 1, nbytes, outfile); |
|
274 |
+ const int nwritten = fwrite(block, 1, (size_t)nbytes, outfile); |
|
275 | 275 |
|
276 | 276 |
if(nwritten != nbytes) { |
277 | 277 |
cli_errmsg("cli_untar: only wrote %d bytes to file %s (out of disk space?)\n", |