Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
constify what can be constified
Eitan Adler committed 14 years ago
commit daf38f4707a3c3885cad1211a61355fb045c1eca
parent 13c8c78
5 files changed +7 -7
modified libpkg/scripts.c
@@ -3,15 +3,15 @@
#include <pkg_error.h>

int
-
pkg_script_run(struct pkg *pkg, pkg_script_t type)
+
pkg_script_run(struct pkg * const pkg, pkg_script_t type)
{
	struct pkg_script *script = NULL;
	pkg_script_t stype;
-
	struct sbuf *script_cmd = sbuf_new_auto();
+
	struct sbuf * const script_cmd = sbuf_new_auto();
	size_t i;

	struct {
-
		const char *arg;
+
		const char * const arg;
		const pkg_script_t b;
		const pkg_script_t a;
	} const map[] = {
modified pkg/add.c
@@ -14,7 +14,7 @@
#include "add.h"

static int
-
is_url(const char *pattern)
+
is_url(const char * const pattern)
{
	if (strncmp(pattern, "http://", 7) == 0 ||
		strncmp(pattern, "https://", 8) == 0 ||
modified pkg/create.c
@@ -20,7 +20,7 @@ usage_create(void)
}

static int
-
pkg_create_matches(int argc, char **argv, match_t match, pkg_formats fmt, const char *outdir, const char *rootdir)
+
pkg_create_matches(int argc, char **argv, match_t match, pkg_formats fmt, const char * const outdir, const char * const rootdir)
{
	int i, ret = 0, retcode = 0;
	struct pkgdb *db = NULL;
modified pkg/info.c
@@ -21,7 +21,7 @@ enum sign {
};

static int
-
print_info(struct pkg *pkg, unsigned int opt)
+
print_info(struct pkg * const pkg, unsigned int opt)
{
	struct pkg_dep *dep = NULL;
	struct pkg_file *file = NULL;
modified pkg/register.c
@@ -15,7 +15,7 @@

#include "register.h"

-
static const char *scripts[] = {
+
static const char * const scripts[] = {
	"+INSTALL",
	"+PRE_INSTALL",
	"+POST_INSTALL",