Constify and staticify for lint.

This commit is contained in:
Mark Murray
2002-10-18 14:45:00 +00:00
parent 0399c2578e
commit ba8acd9de2
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -252,7 +252,7 @@ main(int argc, char *argv[])
exit (copy(argv, type, fts_options)); exit (copy(argv, type, fts_options));
} }
int static int
copy(char *argv[], enum op type, int fts_options) copy(char *argv[], enum op type, int fts_options)
{ {
struct stat to_stat; struct stat to_stat;
@@ -484,7 +484,7 @@ copy(char *argv[], enum op type, int fts_options)
* parent directory, whereas directories tend not to be. Copying the * parent directory, whereas directories tend not to be. Copying the
* files first reduces seeking. * files first reduces seeking.
*/ */
int static int
mastercmp(const FTSENT * const *a, const FTSENT * const *b) mastercmp(const FTSENT * const *a, const FTSENT * const *b)
{ {
int a_info, b_info; int a_info, b_info;
+2 -2
View File
@@ -45,8 +45,8 @@ extern int fflag, iflag, nflag, pflag, vflag;
__BEGIN_DECLS __BEGIN_DECLS
int copy_fifo(struct stat *, int); int copy_fifo(struct stat *, int);
int copy_file(FTSENT *, int); int copy_file(const FTSENT *, int);
int copy_link(FTSENT *, int); int copy_link(const FTSENT *, int);
int copy_special(struct stat *, int); int copy_special(struct stat *, int);
int setfile(struct stat *, int); int setfile(struct stat *, int);
void usage(void); void usage(void);
+2 -2
View File
@@ -58,7 +58,7 @@ __FBSDID("$FreeBSD$");
#include "extern.h" #include "extern.h"
int int
copy_file(FTSENT *entp, int dne) copy_file(const FTSENT *entp, int dne)
{ {
static char buf[MAXBSIZE]; static char buf[MAXBSIZE];
struct stat *fs; struct stat *fs;
@@ -193,7 +193,7 @@ copy_file(FTSENT *entp, int dne)
} }
int int
copy_link(FTSENT *p, int exists) copy_link(const FTSENT *p, int exists)
{ {
int len; int len;
char llink[PATH_MAX]; char llink[PATH_MAX];