Commit Graph

175348 Commits

Author SHA1 Message Date
ed
b99d6c2ed3 Mark global functions and/or variables in boot0cfg(8) static where possible.
This allows compilers and static analyzers to do more thorough analysis.
2011-11-06 19:01:35 +00:00
ed
13541c14c5 Mark global functions and/or variables in apm(8) static where possible.
This allows compilers and static analyzers to do more thorough analysis.
2011-11-06 19:01:30 +00:00
ae
8cbc1bac70 bsdlabel(8) could automatically fill many of disklabel's deprecated
fields, but user could specify some of those fields when edits disklabel
with `bsdlabel -e`. But without -A flag these fields might be
overwritten with default values from the virgin disklabel.
So, don't overwrite such fields if they are not zero. Also add checks
to prevent creating disklabel with less than DEFPARTITIONS and more
than MAXPARTITIONS partitions.

PR:		bin/162332
Tested by:	Eugene Grosbein
MFC after:	1 week
2011-11-06 18:59:42 +00:00
ed
50646b91e6 Mark global functions and/or variables in xstr(1) static where possible.
This allows compilers and static analyzers to more thorough analysis.
2011-11-06 18:50:39 +00:00
ed
dc00e03576 Mark global functions and/or variables in whois(1) static where possible.
This allows compilers and static analyzers to more thorough analysis.
2011-11-06 18:50:33 +00:00
ed
04b0cc9b2b Mark global functions and/or variables in which(1) static where possible.
This allows compilers and static analyzers to more thorough analysis.
2011-11-06 18:50:26 +00:00
ed
90167b1812 Mark global functions and/or variables in whereis(1) static where possible.
This allows compilers and static analyzers to more thorough analysis.
2011-11-06 18:50:19 +00:00
ed
8ea5e6afe9 Mark global functions and/or variables in unifdef(1) static where possible.
This allows compilers and static analyzers to more thorough analysis.
2011-11-06 18:50:00 +00:00
ed
5675f1d7a7 Mark global functions and/or variables in paste(1) static where possible.
This allows compilers and static analyzers to more thorough analysis.
2011-11-06 18:49:53 +00:00
ed
bfc6ddd863 Mark global functions and/or variables in m4(1) static where possible.
This allows compilers and static analyzers to more thorough analysis.
2011-11-06 18:49:48 +00:00
ed
fb0088d7d0 Mark global functions and/or variables in lam(1) static where possible.
This allows compilers and static analyzers to more thorough analysis.
2011-11-06 18:49:41 +00:00
ed
b9deaeaf51 Mark global functions and/or variables in fstat(1) static where possible.
This allows compilers and static analyzers to more thorough analysis.
2011-11-06 18:49:36 +00:00
ed
b4971e80fe Mark global functions and/or variables in expand(1) static where possible.
This allows compilers and static analyzers to more thorough analysis.
2011-11-06 18:49:30 +00:00
ed
b333c88308 Mark global functions and/or variables in enigma(1) static where possible.
This allows compilers and static analyzers to more thorough analysis.
2011-11-06 18:49:23 +00:00
ed
a7c3f252fc Mark global functions and/or variables in compress(1) static where possible.
This allows compilers and static analyzers to more thorough analysis.
2011-11-06 18:49:16 +00:00
ed
ba068938d1 Mark global functions and/or variables in comm(1) static where possible.
This allows compilers and static analyzers to more thorough analysis.
2011-11-06 18:49:10 +00:00
ed
3894f3031c Mark global functions and/or variables in checknr(1) static where possible.
This allows compilers and static analyzers to more thorough analysis.
2011-11-06 18:49:03 +00:00
ed
a2c6b647f1 Add missing static keywords to at(1).
While there, tidy up the privs.h part, where at.c has to #define to
declare some globals. Also group static and non-static global variables
in at.c.
2011-11-06 17:32:29 +00:00
ae
8fdc44b459 To be in sync with GEOM_PART_BSD limit the maximum number of supported
partitions to 20.

MFC after:	1 week
2011-11-06 17:30:32 +00:00
ed
a3202a01ad Mark the structure fields as const.
This allows us to simply place these strings as constants in the table
itself, letting the compiler decide to simply merge duplicate strings.
2011-11-06 17:20:44 +00:00
ed
cafdfab148 Make all functions and global variables static for cdcontrol(8).
While there, replace __const by const, which seems to be our preference
nowadays. Also fix some style(9) bugs by adding newlines and removing
unneeded spaces from function declarations.
2011-11-06 16:52:26 +00:00
ed
599a60039e Mark all global variables static for mptable(1).
While there, remove basetableEntryTypes, which became unused in r71209.
2011-11-06 16:47:50 +00:00
ed
f926e2345d Eliminate global variables.
There is no reason why these three variables should be declared as
global variables, while the others aren't. They are only used inside
main().
2011-11-06 16:40:17 +00:00
ed
44d67fb806 Simplify inclusion of the tsptype array a bit.
We don't need this array in timed.c -- only readmsg.c.
2011-11-06 16:37:15 +00:00
dim
897775d6ee When one attempts to compile the tree with -march=i386, which also used
to be gcc's default before r198344, calls to atomic builtins will not be
expanded inline.  Instead, they will be generated as calls to external
functions (e.g. __sync_fetch_and_add_N), leading to linking errors later
on.

Put in a seatbelt that disables use of atomic builtins in libstdc++ and
llvm, when tuning specifically for the real i386 CPU.  This does not
protect against all possible issues, but it is better than nothing.
2011-11-06 14:07:23 +00:00
antoine
f22dd3ece0 Add more obsolete files. 2011-11-06 14:00:18 +00:00
trociny
f9135967f2 Cache SO_REUSEPORT socket option in inpcb-layer in order to avoid
inp_socket->so_options dereference when we may not acquire the lock on
the inpcb.

This fixes the crash due to NULL pointer dereference in
in_pcbbind_setup() when inp_socket->so_options in a pcb returned by
in_pcblookup_local() was checked.

Reported by:	dave jones <s.dave.jones@gmail.com>, Arnaud Lacombe <lacombar@gmail.com>
Suggested by:	rwatson
Glanced by:	rwatson
Tested by:	dave jones <s.dave.jones@gmail.com>
2011-11-06 10:47:20 +00:00
trociny
ddbde914da Before dereferencing intotw() check for NULL, the same way as it is
done for in_pcb (see r157474).

MFC after:	1 week
2011-11-06 09:29:52 +00:00
trociny
a22bc64df7 Fix the typo made in r157474.
MFC after:	3 days
2011-11-06 09:17:48 +00:00
ed
b8b9c31dd0 Correct the change made in r227166.
This function is only compiled in when building WITH_AUDIT.
2011-11-06 09:09:45 +00:00
ed
89e56ab1b3 Add missing static keywords to xinstall(1) 2011-11-06 08:19:07 +00:00
ed
bc3df37206 Add missing static keywords to wc(1) 2011-11-06 08:19:00 +00:00
ed
6ad23491ec Add missing static keywords to wall(1) 2011-11-06 08:18:55 +00:00
ed
40d992c2db Add missing static keywords to w(1) 2011-11-06 08:18:47 +00:00
ed
66190ef17d Add missing static keywords to vis(1) 2011-11-06 08:18:42 +00:00
ed
c186741140 Add missing static keywords to uuencode(1) 2011-11-06 08:18:35 +00:00
ed
25b4fbd02b Add missing static keywords to usbhidctl(1) 2011-11-06 08:18:30 +00:00
ed
8eae2b0d9c Add missing static keywords to usbhidaction(1) 2011-11-06 08:18:23 +00:00
ed
7db87786d7 Add missing static keywords to units(1) 2011-11-06 08:18:17 +00:00
ed
7842959704 Add missing static keywords to uniq(1) 2011-11-06 08:18:11 +00:00
ed
9cc47b87a7 Add missing static keywords to unexpand(1) 2011-11-06 08:18:05 +00:00
ed
d77d58cdda Add missing static keywords to uname(1) 2011-11-06 08:17:59 +00:00
ed
75f6535a23 Add missing static keywords to ul(1) 2011-11-06 08:17:53 +00:00
ed
0aac214b40 Add missing static keywords to tsort(1) 2011-11-06 08:17:47 +00:00
ed
9e267acf2e Add missing static keywords to tr(1) 2011-11-06 08:17:42 +00:00
ed
d1b8bc9380 Add missing static keywords to tee(1) 2011-11-06 08:17:35 +00:00
ed
e878bace95 Add missing static keywords to tcopy(1) 2011-11-06 08:17:29 +00:00
ed
f110f8c649 Add missing static keywords to talk(1) 2011-11-06 08:17:23 +00:00
ed
ae674f5b37 Add missing static keywords to tail(1) 2011-11-06 08:17:17 +00:00
ed
0d6f43e2bd Add missing static keywords to split(1) 2011-11-06 08:17:11 +00:00