commit 22b04144743507f991d142a4b67f6fe550c64361
parent 9aba4fcedcb5005df99354261f0a427808a8f2d6
Author: Rolf Eike Beer <eike@sf-mail.de>
Date: Thu, 14 May 2020 21:23:51 +0200
use unsigned variables to store the result of str_len()
Diffstat:
4 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/qmail-send.c b/qmail-send.c
@@ -167,16 +167,14 @@ stralloc *sa;
char *sender;
char *recip;
{
- int i;
- int j;
- int k;
+ unsigned int i;
i = str_len(sender);
if (i >= 4)
if (str_equal(sender + i - 4,"-@[]"))
{
- j = byte_rchr(sender,i - 4,'@');
- k = str_rchr(recip,'@');
+ unsigned int j = byte_rchr(sender,i - 4,'@');
+ unsigned int k = str_rchr(recip,'@');
if (recip[k] && (j + 5 <= i))
{
/* owner-@host-@[] -> owner-recipbox=reciphost@host */
@@ -574,9 +572,9 @@ int j;
char *stripvdomprepend(recip)
char *recip;
{
- int i;
+ unsigned int i;
char *domain;
- int domainlen;
+ unsigned int domainlen;
char *prepend;
i = str_rchr(recip,'@');
diff --git a/qsmhook.c b/qsmhook.c
@@ -45,7 +45,7 @@ char **argv;
int opt;
char **arg;
char *x;
- int i;
+ unsigned int i;
int flagesc;
sig_pipeignore();
diff --git a/sendmail.c b/sendmail.c
@@ -49,9 +49,9 @@ void do_sender(s)
const char *s;
{
char *x;
- int n;
- int a;
- int i;
+ unsigned int n;
+ unsigned int a;
+ unsigned int i;
env_unset("QMAILNAME");
env_unset("MAILNAME");
diff --git a/stralloc_arts.c b/stralloc_arts.c
@@ -6,7 +6,7 @@ int stralloc_starts(sa,s)
stralloc *sa;
char *s;
{
- int len;
+ unsigned int len;
len = str_len(s);
return (sa->len >= len) && byte_equal(s,len,sa->s);
}