|
Harald Hoyer |
75f812 |
From 599182b10870a826360091246f0a5f26c691f690 Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
75f812 |
From: Kamil Rytarowski <n54@gmx.com>
|
|
Harald Hoyer |
75f812 |
Date: Sat, 11 May 2013 17:06:45 +0200
|
|
Harald Hoyer |
75f812 |
Subject: [PATCH] Introduce stricter type correctness
|
|
Harald Hoyer |
75f812 |
|
|
Harald Hoyer |
75f812 |
---
|
|
Harald Hoyer |
75f812 |
install/dracut-install.c | 12 ++++++------
|
|
Harald Hoyer |
75f812 |
1 file changed, 6 insertions(+), 6 deletions(-)
|
|
Harald Hoyer |
75f812 |
|
|
Harald Hoyer |
75f812 |
diff --git a/install/dracut-install.c b/install/dracut-install.c
|
|
Harald Hoyer |
75f812 |
index 584a30b..33fad4a 100644
|
|
Harald Hoyer |
75f812 |
--- a/install/dracut-install.c
|
|
Harald Hoyer |
75f812 |
+++ b/install/dracut-install.c
|
|
Harald Hoyer |
75f812 |
@@ -80,9 +80,9 @@ static char *convert_abs_rel(const char *from, const char *target)
|
|
Harald Hoyer |
75f812 |
_cleanup_free_ char *realtarget = NULL;
|
|
Harald Hoyer |
75f812 |
_cleanup_free_ char *target_dir_p = NULL, *realpath_p = NULL;
|
|
Harald Hoyer |
75f812 |
const char *realfrom = from;
|
|
Harald Hoyer |
75f812 |
- int level = 0, fromlevel = 0, targetlevel = 0;
|
|
Harald Hoyer |
75f812 |
- int l, i, rl;
|
|
Harald Hoyer |
75f812 |
- int dirlen;
|
|
Harald Hoyer |
75f812 |
+ size_t level = 0, fromlevel = 0, targetlevel = 0;
|
|
Harald Hoyer |
75f812 |
+ int l;
|
|
Harald Hoyer |
75f812 |
+ size_t i, rl, dirlen;
|
|
Harald Hoyer |
75f812 |
|
|
Harald Hoyer |
75f812 |
target_dir_p = strdup(target);
|
|
Harald Hoyer |
75f812 |
if (!target_dir_p)
|
|
Harald Hoyer |
75f812 |
@@ -215,7 +215,7 @@ static int cp(const char *src, const char *dst)
|
|
Harald Hoyer |
75f812 |
if (ret == 0) {
|
|
Harald Hoyer |
75f812 |
struct timeval tv[2];
|
|
Harald Hoyer |
75f812 |
if (fchown(dest_desc, sb.st_uid, sb.st_gid) != 0)
|
|
Harald Hoyer |
75f812 |
- fchown(dest_desc, -1, sb.st_gid);
|
|
Harald Hoyer |
75f812 |
+ fchown(dest_desc, (__uid_t)-1, sb.st_gid);
|
|
Harald Hoyer |
75f812 |
tv[0].tv_sec = sb.st_atime;
|
|
Harald Hoyer |
75f812 |
tv[0].tv_usec = 0;
|
|
Harald Hoyer |
75f812 |
tv[1].tv_sec = sb.st_mtime;
|
|
Harald Hoyer |
75f812 |
@@ -297,7 +297,7 @@ static int resolve_deps(const char *src)
|
|
Harald Hoyer |
75f812 |
log_debug("ldd: '%s'", buf);
|
|
Harald Hoyer |
75f812 |
|
|
Harald Hoyer |
75f812 |
if (strstr(buf, "you do not have execution permission")) {
|
|
Harald Hoyer |
75f812 |
- log_error(buf);
|
|
Harald Hoyer |
75f812 |
+ log_error("%s", buf);
|
|
Harald Hoyer |
75f812 |
ret+=1;
|
|
Harald Hoyer |
75f812 |
break;
|
|
Harald Hoyer |
75f812 |
}
|
|
Harald Hoyer |
75f812 |
@@ -670,7 +670,7 @@ static int parse_argv(int argc, char *argv[])
|
|
Harald Hoyer |
75f812 |
static int resolve_lazy(int argc, char **argv)
|
|
Harald Hoyer |
75f812 |
{
|
|
Harald Hoyer |
75f812 |
int i;
|
|
Harald Hoyer |
75f812 |
- int destrootdirlen = strlen(destrootdir);
|
|
Harald Hoyer |
75f812 |
+ size_t destrootdirlen = strlen(destrootdir);
|
|
Harald Hoyer |
75f812 |
int ret = 0;
|
|
Harald Hoyer |
75f812 |
char *item;
|
|
Harald Hoyer |
75f812 |
for (i = 0; i < argc; i++) {
|