diff --git a/src/lib-sieve/sieve-script-private.h b/src/lib-sieve/sieve-script-private.h
index 059233f11067b2e83508f9ad930166754c8bf6f6..1e8455cc8d6dff54e8150e987368d84c9f279a7c 100644
--- a/src/lib-sieve/sieve-script-private.h
+++ b/src/lib-sieve/sieve-script-private.h
@@ -41,8 +41,8 @@ struct sieve_script_vfuncs {
 	int (*get_size)(const struct sieve_script *script, uoff_t *size_r);
 
 	/* matching */
-	int (*cmp)(const struct sieve_script *script,
-		   const struct sieve_script *other);
+	int (*cmp)(const struct sieve_script *script1,
+		   const struct sieve_script *script2);
 };
 
 struct sieve_script {
diff --git a/src/lib-sieve/sieve-script.c b/src/lib-sieve/sieve-script.c
index dbbe303f7131d8a673420d733f8ad8cbe5e1b42c..95052a309874b8b1e778abe3ac94f32b879a08cc 100644
--- a/src/lib-sieve/sieve-script.c
+++ b/src/lib-sieve/sieve-script.c
@@ -353,23 +353,23 @@ int sieve_script_get_stream(struct sieve_script *script,
  * Comparison
  */
 
-int sieve_script_cmp(const struct sieve_script *script,
-		     const struct sieve_script *other)
+int sieve_script_cmp(const struct sieve_script *script1,
+		     const struct sieve_script *script2)
 {
-	if (script == other)
+	if (script1 == script2)
 		return 0;
-	if (script == NULL || other == NULL)
-		return (script == NULL ? -1 : 1);
-	if (script->script_class != other->script_class)
-		return (script->script_class > other->script_class ? 1 : -1);
+	if (script1 == NULL || script2 == NULL)
+		return (script1 == NULL ? -1 : 1);
+	if (script1->script_class != script2->script_class)
+		return (script1->script_class > script2->script_class ? 1 : -1);
 
-	if (script->v.cmp == NULL) {
-		i_assert (script->location != NULL && other->location != NULL);
+	if (script1->v.cmp == NULL) {
+		i_assert (script1->location != NULL && script2->location != NULL);
 
-		return strcmp(script->location, other->location);
+		return strcmp(script1->location, script2->location);
 	}
 
-	return script->v.cmp(script, other);
+	return script1->v.cmp(script1, script2);
 }
 
 unsigned int sieve_script_hash(const struct sieve_script *script)
diff --git a/src/lib-sieve/sieve-script.h b/src/lib-sieve/sieve-script.h
index 25a5736e7ef244e040c55f5dfdb8907924317c3f..a409eb1a25e0fd406cab1e2a7f6e1175689b4be2 100644
--- a/src/lib-sieve/sieve-script.h
+++ b/src/lib-sieve/sieve-script.h
@@ -127,13 +127,13 @@ sieve_file_script_get_path(const struct sieve_script *script) ATTR_PURE;
  * Comparison
  */
 
-int sieve_script_cmp(const struct sieve_script *script,
-		     const struct sieve_script *other);
+int sieve_script_cmp(const struct sieve_script *script1,
+		     const struct sieve_script *script2);
 static inline bool
-sieve_script_equals(const struct sieve_script *script,
-		    const struct sieve_script *other)
+sieve_script_equals(const struct sieve_script *script1,
+		    const struct sieve_script *script2)
 {
-	return (sieve_script_cmp(script, other) == 0);
+	return (sieve_script_cmp(script1, script2) == 0);
 }
 
 unsigned int sieve_script_hash(const struct sieve_script *script);
diff --git a/src/lib-sieve/storage/file/sieve-file-script.c b/src/lib-sieve/storage/file/sieve-file-script.c
index babe5b419a6b701e653b0be1d72ec19421a1dd72..ac2b0eb46fd77f62bbafd03046e96e57cbb4c63a 100644
--- a/src/lib-sieve/storage/file/sieve-file-script.c
+++ b/src/lib-sieve/storage/file/sieve-file-script.c
@@ -807,38 +807,38 @@ const char *sieve_file_script_get_path(const struct sieve_script *script)
  */
 
 static int
-sieve_file_script_cmp(const struct sieve_script *script,
-		      const struct sieve_script *other)
+sieve_file_script_cmp(const struct sieve_script *script1,
+		      const struct sieve_script *script2)
 {
-	const struct sieve_file_script *fscript =
-		container_of(script, const struct sieve_file_script, script);
-	const struct sieve_file_script *fother =
-		container_of(other, const struct sieve_file_script, script);
+	const struct sieve_file_script *fscript1 =
+		container_of(script1, const struct sieve_file_script, script);
+	const struct sieve_file_script *fscript2 =
+		container_of(script2, const struct sieve_file_script, script);
 	int ret;
 
-	if (!script->open || !other->open) {
-		struct sieve_storage *storage = script->storage;
-		struct sieve_storage *sother = other->storage;
+	if (!script1->open || !script2->open) {
+		struct sieve_storage *storage1 = script1->storage;
+		struct sieve_storage *storage2 = script2->storage;
 
-		ret = strcmp(storage->location, sother->location);
+		ret = strcmp(storage1->location, storage2->location);
 		if (ret != 0)
 			return ret;
 
-		i_assert(script->name != NULL && other->name != NULL);
-		return strcmp(script->name, other->name);
+		i_assert(script1->name != NULL && script2->name != NULL);
+		return strcmp(script1->name, script2->name);
 	}
 
-	if (major(fscript->st.st_dev) != major(fother->st.st_dev)) {
-		return (major(fscript->st.st_dev) > major(fother->st.st_dev) ?
-			1 : -1);
+	if (major(fscript1->st.st_dev) != major(fscript2->st.st_dev)) {
+		return (major(fscript1->st.st_dev) >
+			major(fscript2->st.st_dev) ? 1 : -1);
 	}
-	if (minor(fscript->st.st_dev) != minor(fother->st.st_dev)) {
-		return (minor(fscript->st.st_dev) > minor(fother->st.st_dev) ?
-			1 : -1);
+	if (minor(fscript1->st.st_dev) != minor(fscript2->st.st_dev)) {
+		return (minor(fscript1->st.st_dev) >
+			minor(fscript2->st.st_dev) ? 1 : -1);
 	}
 
-	if (fscript->st.st_ino != fother->st.st_ino)
-		return (fscript->st.st_ino > fother->st.st_ino ? 1 : -1);
+	if (fscript1->st.st_ino != fscript2->st.st_ino)
+		return (fscript1->st.st_ino > fscript2->st.st_ino ? 1 : -1);
 
 	return 0;
 }
diff --git a/src/lib-sieve/storage/ldap/sieve-ldap-script.c b/src/lib-sieve/storage/ldap/sieve-ldap-script.c
index 374b8d0db58323c78cd7d93bef7c15ac028fe765..1ee543a5d3a7efdeb1c8d5c1181fbb78cf0325f4 100644
--- a/src/lib-sieve/storage/ldap/sieve-ldap-script.c
+++ b/src/lib-sieve/storage/ldap/sieve-ldap-script.c
@@ -263,14 +263,14 @@ sieve_ldap_script_binary_save(struct sieve_script *script,
 }
 
 static int
-sieve_ldap_script_cmp(const struct sieve_script *script,
-		      const struct sieve_script *other)
+sieve_ldap_script_cmp(const struct sieve_script *script1,
+		      const struct sieve_script *script2)
 {
 	int ret;
 
-	i_assert(script->name != NULL && other->name != NULL);
+	i_assert(script1->name != NULL && script2->name != NULL);
 
-	ret = strcmp(script->name, other->name);
+	ret = strcmp(script1->name, script2->name);
 	if (ret != 0)
 		return (ret > 0 ? 1 : -1);
 	return 0;