summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJirka Hladky <jhladky@redhat.com>2020-07-01 03:18:19 +0200
committerJirka Hladky <jhladky@redhat.com>2020-07-01 03:18:19 +0200
commit7ae444b7a0aa64a96729d78dd724b4398b9b0eaa (patch)
treee3ac60a726de5d34030ae3b09a432977df65daf3
parentMerge pull request #43 from Chocobo1/lint (diff)
downloadhaveged-7ae444b7a0aa64a96729d78dd724b4398b9b0eaa.tar.xz
haveged-7ae444b7a0aa64a96729d78dd724b4398b9b0eaa.zip
Fixed Wsign-compare compiler warnings
-rw-r--r--src/haveged.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/haveged.c b/src/haveged.c
index 135dbcb..014b4ba 100644
--- a/src/haveged.c
+++ b/src/haveged.c
@@ -359,7 +359,7 @@ int main(int argc, char **argv)
root = optarg;
len = (int)strlen(root);
ret = snprintf(message, sizeof(message), "%c\002%c%s%n", cmd[0], (int)(strlen(root) + 1), root, &len);
- if (ret < 0 || ret >= sizeof(message)) {
+ if (ret < 0 || (unsigned) ret >= sizeof(message)) {
fprintf(stderr, "%s: can not store message\n", params->daemon);
break;
}
@@ -687,7 +687,7 @@ static void set_watermark( /* RETURN: nothing */
{
FILE *wm_fh;
- if (level > (poolSize - 32))
+ if ( (H_UINT) level > (poolSize - 32))
level = poolSize - 32;
wm_fh = fopen(params->watermark, "w");
if (wm_fh) {