summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2013-07-17 13:00:49 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-09-11 19:44:54 +0200
commit71e234151ddc6b50576364c30bda2b72264b1083 (patch)
treed03aa4a2f86a147ee0083a021312e4f12fac2a4e
parent2b68335643d7b48225d4ab15ac116afcbf279505 (diff)
downloadsssd-71e234151ddc6b50576364c30bda2b72264b1083.tar.gz
sssd-71e234151ddc6b50576364c30bda2b72264b1083.tar.bz2
sssd-71e234151ddc6b50576364c30bda2b72264b1083.zip
Fix formating of variables with type: ssize_t
-rw-r--r--src/providers/ipa/ipa_selinux.c4
-rw-r--r--src/providers/krb5/krb5_child_handler.c2
-rw-r--r--src/providers/krb5/krb5_common.c4
-rw-r--r--src/tools/files.c2
-rw-r--r--src/util/backup_file.c2
-rw-r--r--src/util/child_common.c3
-rw-r--r--src/util/server.c4
7 files changed, 11 insertions, 10 deletions
diff --git a/src/providers/ipa/ipa_selinux.c b/src/providers/ipa/ipa_selinux.c
index 39bebebf..5f734338 100644
--- a/src/providers/ipa/ipa_selinux.c
+++ b/src/providers/ipa/ipa_selinux.c
@@ -672,7 +672,7 @@ static errno_t write_selinux_login_file(const char *username, char *string)
char *path = NULL;
char *tmp_path = NULL;
ssize_t written;
- int len;
+ size_t len;
int fd = -1;
mode_t oldmask;
TALLOC_CTX *tmp_ctx;
@@ -743,7 +743,7 @@ static errno_t write_selinux_login_file(const char *username, char *string)
}
if (written != len) {
- DEBUG(SSSDBG_OP_FAILURE, ("Expected to write %d bytes, wrote %d",
+ DEBUG(SSSDBG_OP_FAILURE, ("Expected to write %zd bytes, wrote %zu",
written, len));
ret = EIO;
goto done;
diff --git a/src/providers/krb5/krb5_child_handler.c b/src/providers/krb5/krb5_child_handler.c
index 8117d1e5..20b83d13 100644
--- a/src/providers/krb5/krb5_child_handler.c
+++ b/src/providers/krb5/krb5_child_handler.c
@@ -538,7 +538,7 @@ parse_krb5_child_response(TALLOC_CTX *mem_ctx, uint8_t *buf, ssize_t len,
msg_status, msg_type, msg_len));
if ((p + msg_len) > len) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("message format error [%d] > [%d].\n",
+ DEBUG(SSSDBG_CRIT_FAILURE, ("message format error [%d] > [%zd].\n",
p+msg_len, len));
return EINVAL;
}
diff --git a/src/providers/krb5/krb5_common.c b/src/providers/krb5/krb5_common.c
index 80eaeb56..c40f0dd4 100644
--- a/src/providers/krb5/krb5_common.c
+++ b/src/providers/krb5/krb5_common.c
@@ -410,7 +410,7 @@ errno_t write_krb5info_file(const char *realm, const char *server,
char *krb5info_name = NULL;
TALLOC_CTX *tmp_ctx = NULL;
const char *name_tmpl = NULL;
- int server_len;
+ size_t server_len;
ssize_t written;
mode_t old_umask;
@@ -471,7 +471,7 @@ errno_t write_krb5info_file(const char *realm, const char *server,
if (written != server_len) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Write error, wrote [%d] bytes, expected [%d]\n",
+ ("Write error, wrote [%zd] bytes, expected [%zu]\n",
written, server_len));
ret = EIO;
goto done;
diff --git a/src/tools/files.c b/src/tools/files.c
index ff04d09f..7fc84228 100644
--- a/src/tools/files.c
+++ b/src/tools/files.c
@@ -408,7 +408,7 @@ copy_file(int ifd,
if (written != cnt) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Wrote %d bytes, expected %d\n", written, cnt));
+ ("Wrote %zd bytes, expected %zd\n", written, cnt));
goto done;
}
}
diff --git a/src/util/backup_file.c b/src/util/backup_file.c
index edbf868c..316c1cfe 100644
--- a/src/util/backup_file.c
+++ b/src/util/backup_file.c
@@ -103,7 +103,7 @@ int backup_file(const char *src_file, int dbglvl)
}
if (written != numread) {
- DEBUG(dbglvl, ("Wrote %d bytes expected %d bytes\n",
+ DEBUG(dbglvl, ("Wrote %zd bytes expected %zd bytes\n",
written, numread));
ret = EIO;
goto done;
diff --git a/src/util/child_common.c b/src/util/child_common.c
index 2bd2bbc3..28358606 100644
--- a/src/util/child_common.c
+++ b/src/util/child_common.c
@@ -484,7 +484,8 @@ static void read_pipe_handler(struct tevent_context *ev,
return;
} else {
- DEBUG(1, ("unexpected return value of read [%d].\n", size));
+ DEBUG(SSSDBG_CRIT_FAILURE,
+ ("unexpected return value of read [%zd].\n", size));
tevent_req_error(req, EINVAL);
return;
}
diff --git a/src/util/server.c b/src/util/server.c
index 9d3c9cb0..a33207b3 100644
--- a/src/util/server.c
+++ b/src/util/server.c
@@ -147,7 +147,7 @@ int pidfile(const char *path, const char *name)
int fd;
int ret, err;
ssize_t len;
- ssize_t size;
+ size_t size;
ssize_t written;
ssize_t pidlen = sizeof(pid_str) - 1;
@@ -227,7 +227,7 @@ int pidfile(const char *path, const char *name)
if (written != size) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Wrote %d bytes expected %d\n", written, size));
+ ("Wrote %zd bytes expected %zu\n", written, size));
close(fd);
return EIO;
}