Cleanup: zhack should not declare function prototypes in main()
Instead, it should include the proper header. CodeQL caught this. Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Closes #14263
This commit is contained in:
parent
0620051224
commit
aaa9a6700f
|
@ -30,6 +30,7 @@
|
||||||
* result in corrupted pools.
|
* result in corrupted pools.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <zfs_prop.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
@ -646,8 +647,6 @@ zhack_do_label(int argc, char **argv)
|
||||||
int
|
int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
extern void zfs_prop_init(void);
|
|
||||||
|
|
||||||
char *path[MAX_NUM_PATHS];
|
char *path[MAX_NUM_PATHS];
|
||||||
const char *subcommand;
|
const char *subcommand;
|
||||||
int rv = 0;
|
int rv = 0;
|
||||||
|
|
Loading…
Reference in New Issue