diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2019-11-04 17:51:52 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2019-11-04 17:51:52 +0200 |
commit | b7b5a9c456fdcd767c0f041d67af240de5b58fce (patch) | |
tree | 838cd975c733e18c9cab00dea26b34719a95b19b /src | |
parent | 6ee76233f40924b358b715911aa1c0e3c96a026c (diff) | |
download | cpio-b7b5a9c456fdcd767c0f041d67af240de5b58fce.tar.gz cpio-b7b5a9c456fdcd767c0f041d67af240de5b58fce.tar.bz2 |
Various fixes
* doc/cpio.texi: Document URLs of the mailing list archive and
subscription interface.
* src/copyin.c (try_existing_file): Change type of the last argument.
(copyin_file): Initialize existing_dir.
* src/dstring.c: Include xalloc.h
* src/filemode.c (mode_string): mode is unsigned int.
Diffstat (limited to 'src')
-rw-r--r-- | src/copyin.c | 4 | ||||
-rw-r--r-- | src/dstring.c | 4 | ||||
-rw-r--r-- | src/filemode.c | 2 |
3 files changed, 4 insertions, 6 deletions
diff --git a/src/copyin.c b/src/copyin.c index 7cdfda3..fd20426 100644 --- a/src/copyin.c +++ b/src/copyin.c @@ -178,7 +178,7 @@ list_file (struct cpio_file_stat* file_hdr, int in_file_des) static int try_existing_file (struct cpio_file_stat* file_hdr, int in_file_des, - int *existing_dir) + bool *existing_dir) { struct stat file_stat; @@ -675,7 +675,7 @@ copyin_link (struct cpio_file_stat *file_hdr, int in_file_des) static void copyin_file (struct cpio_file_stat *file_hdr, int in_file_des) { - int existing_dir; + bool existing_dir = false; if (!to_stdout_option && try_existing_file (file_hdr, in_file_des, &existing_dir) < 0) diff --git a/src/dstring.c b/src/dstring.c index ddad4c8..e9c063f 100644 --- a/src/dstring.c +++ b/src/dstring.c @@ -28,9 +28,7 @@ #include <strings.h> #endif #include "dstring.h" - -char *xmalloc (unsigned n); -char *xrealloc (char *p, unsigned n); +#include <xalloc.h> /* Initialiaze dynamic string STRING with space for SIZE characters. */ diff --git a/src/filemode.c b/src/filemode.c index 5fc6c74..beb59e4 100644 --- a/src/filemode.c +++ b/src/filemode.c @@ -191,7 +191,7 @@ setst (unsigned short bits, char *chars) `struct stat' is given as an argument. */ void -mode_string (unsigned short mode, char *str) +mode_string (unsigned int mode, char *str) { str[0] = ftypelet ((long) mode); rwx ((mode & 0700) << 0, &str[1]); |