mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-25 12:02:01 +01:00
Fix warnings inspired by lint, a commercial lint and WARNS=4.
This commit is contained in:
parent
fab912df88
commit
4b4ed2fe6a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=91084
@ -83,8 +83,11 @@ main(int argc, char *argv[])
|
||||
} else {
|
||||
if (gethostname(hostname, (int)sizeof(hostname)))
|
||||
err(1, "gethostname");
|
||||
if (sflag && (p = strchr(hostname, '.')))
|
||||
*p = '\0';
|
||||
if (sflag) {
|
||||
p = strchr(hostname, '.');
|
||||
if (p != NULL)
|
||||
*p = '\0';
|
||||
}
|
||||
(void)printf("%s\n", hostname);
|
||||
}
|
||||
exit(0);
|
||||
|
@ -131,6 +131,7 @@ main(int argc, char *argv[])
|
||||
exit(linkit(argv[0], ".", 1));
|
||||
case 2: /* ln target source */
|
||||
exit(linkit(argv[0], argv[1], 0));
|
||||
default:
|
||||
}
|
||||
/* ln target1 target2 directory */
|
||||
sourcedir = argv[argc - 1];
|
||||
|
@ -57,16 +57,16 @@ static const char rcsid[] =
|
||||
#include <sysexits.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int build(char *, mode_t);
|
||||
void usage(void);
|
||||
static int build(char *, mode_t);
|
||||
static void usage(void);
|
||||
|
||||
int vflag;
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
int ch, exitval, success, omode, pflag;
|
||||
mode_t *set = (mode_t *)NULL;
|
||||
int ch, exitval, success, pflag;
|
||||
mode_t omode, *set = (mode_t *)NULL;
|
||||
char *mode;
|
||||
|
||||
omode = pflag = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user