core: Minor code cleanup.

* src/engine-gpg.c (build_argv): Remove superfluous tes.
--

gpg_error_from_syserror is guaranteed not to return 0 even if errno is
not set.
This commit is contained in:
Werner Koch 2023-03-27 16:56:29 +02:00
parent b608c084b9
commit 34cc7daba1
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -958,7 +958,6 @@ build_argv (engine_gpg_t gpg, const char *pgmname)
if (!fd_data_map) if (!fd_data_map)
{ {
err = gpg_error_from_syserror (); err = gpg_error_from_syserror ();
if (err)
goto leave; goto leave;
} }
@ -967,7 +966,6 @@ build_argv (engine_gpg_t gpg, const char *pgmname)
if (!argv[argc]) if (!argv[argc])
{ {
err = gpg_error_from_syserror (); err = gpg_error_from_syserror ();
if (err)
goto leave; goto leave;
} }
argc++; argc++;
@ -977,7 +975,6 @@ build_argv (engine_gpg_t gpg, const char *pgmname)
if (!argv[argc]) if (!argv[argc])
{ {
err = gpg_error_from_syserror (); err = gpg_error_from_syserror ();
if (err)
goto leave; goto leave;
} }
argc++; argc++;
@ -988,7 +985,6 @@ build_argv (engine_gpg_t gpg, const char *pgmname)
if (!argv[argc]) if (!argv[argc])
{ {
err = gpg_error_from_syserror (); err = gpg_error_from_syserror ();
if (err)
goto leave; goto leave;
} }
argc++; argc++;
@ -1004,7 +1000,6 @@ build_argv (engine_gpg_t gpg, const char *pgmname)
if (!argv[argc]) if (!argv[argc])
{ {
err = gpg_error_from_syserror (); err = gpg_error_from_syserror ();
if (err)
goto leave; goto leave;
} }
argc++; argc++;
@ -1014,7 +1009,6 @@ build_argv (engine_gpg_t gpg, const char *pgmname)
if (!argv[argc]) if (!argv[argc])
{ {
err = gpg_error_from_syserror (); err = gpg_error_from_syserror ();
if (err)
goto leave; goto leave;
} }
argc++; argc++;
@ -1028,7 +1022,6 @@ build_argv (engine_gpg_t gpg, const char *pgmname)
if (!argv[argc]) if (!argv[argc])
{ {
err = gpg_error_from_syserror (); err = gpg_error_from_syserror ();
if (err)
goto leave; goto leave;
} }
argc++; argc++;
@ -1037,7 +1030,6 @@ build_argv (engine_gpg_t gpg, const char *pgmname)
if (!argv[argc]) if (!argv[argc])
{ {
err = gpg_error_from_syserror (); err = gpg_error_from_syserror ();
if (err)
goto leave; goto leave;
} }
argc++; argc++;
@ -1051,7 +1043,6 @@ build_argv (engine_gpg_t gpg, const char *pgmname)
if (!argv[argc]) if (!argv[argc])
{ {
err = gpg_error_from_syserror (); err = gpg_error_from_syserror ();
if (err)
goto leave; goto leave;
} }
argc++; argc++;
@ -1060,7 +1051,6 @@ build_argv (engine_gpg_t gpg, const char *pgmname)
if (!argv[argc]) if (!argv[argc])
{ {
err = gpg_error_from_syserror (); err = gpg_error_from_syserror ();
if (err)
goto leave; goto leave;
} }
argc++; argc++;
@ -1074,7 +1064,6 @@ build_argv (engine_gpg_t gpg, const char *pgmname)
if (!argv[argc]) if (!argv[argc])
{ {
err = gpg_error_from_syserror (); err = gpg_error_from_syserror ();
if (err)
goto leave; goto leave;
} }
argc++; argc++;
@ -1083,7 +1072,6 @@ build_argv (engine_gpg_t gpg, const char *pgmname)
if (!argv[argc]) if (!argv[argc])
{ {
err = gpg_error_from_syserror (); err = gpg_error_from_syserror ();
if (err)
goto leave; goto leave;
} }
argc++; argc++;
@ -1097,7 +1085,6 @@ build_argv (engine_gpg_t gpg, const char *pgmname)
if (!argv[argc]) if (!argv[argc])
{ {
err = gpg_error_from_syserror (); err = gpg_error_from_syserror ();
if (err)
goto leave; goto leave;
} }
argc++; argc++;
@ -1106,7 +1093,6 @@ build_argv (engine_gpg_t gpg, const char *pgmname)
if (!argv[argc]) if (!argv[argc])
{ {
err = gpg_error_from_syserror (); err = gpg_error_from_syserror ();
if (err)
goto leave; goto leave;
} }
argc++; argc++;
@ -1120,7 +1106,6 @@ build_argv (engine_gpg_t gpg, const char *pgmname)
if (!argv[argc]) if (!argv[argc])
{ {
err = gpg_error_from_syserror (); err = gpg_error_from_syserror ();
if (err)
goto leave; goto leave;
} }
argc++; argc++;
@ -1129,7 +1114,6 @@ build_argv (engine_gpg_t gpg, const char *pgmname)
if (!argv[argc]) if (!argv[argc])
{ {
err = gpg_error_from_syserror (); err = gpg_error_from_syserror ();
if (err)
goto leave; goto leave;
} }
argc++; argc++;
@ -1143,7 +1127,6 @@ build_argv (engine_gpg_t gpg, const char *pgmname)
if (!argv[argc]) if (!argv[argc])
{ {
err = gpg_error_from_syserror (); err = gpg_error_from_syserror ();
if (err)
goto leave; goto leave;
} }
argc++; argc++;
@ -1152,7 +1135,6 @@ build_argv (engine_gpg_t gpg, const char *pgmname)
if (!argv[argc]) if (!argv[argc])
{ {
err = gpg_error_from_syserror (); err = gpg_error_from_syserror ();
if (err)
goto leave; goto leave;
} }
argc++; argc++;
@ -1177,7 +1159,6 @@ build_argv (engine_gpg_t gpg, const char *pgmname)
if (!argv[argc]) if (!argv[argc])
{ {
err = gpg_error_from_syserror (); err = gpg_error_from_syserror ();
if (err)
goto leave; goto leave;
} }
argc++; argc++;
@ -1186,7 +1167,6 @@ build_argv (engine_gpg_t gpg, const char *pgmname)
if (!argv[argc]) if (!argv[argc])
{ {
err = gpg_error_from_syserror (); err = gpg_error_from_syserror ();
if (err)
goto leave; goto leave;
} }
argc++; argc++;
@ -1199,7 +1179,6 @@ build_argv (engine_gpg_t gpg, const char *pgmname)
if (!argv[argc]) if (!argv[argc])
{ {
err = gpg_error_from_syserror (); err = gpg_error_from_syserror ();
if (err)
goto leave; goto leave;
} }
argc++; argc++;
@ -1222,7 +1201,6 @@ build_argv (engine_gpg_t gpg, const char *pgmname)
== -1) == -1)
{ {
err = gpg_error_from_syserror (); err = gpg_error_from_syserror ();
if (err)
goto leave; goto leave;
} }
if (_gpgme_io_set_close_notify (fds[0], if (_gpgme_io_set_close_notify (fds[0],
@ -1272,7 +1250,6 @@ build_argv (engine_gpg_t gpg, const char *pgmname)
if (!argv[argc]) if (!argv[argc])
{ {
err = gpg_error_from_syserror (); err = gpg_error_from_syserror ();
if (err)
goto leave; goto leave;
} }
@ -1298,7 +1275,6 @@ build_argv (engine_gpg_t gpg, const char *pgmname)
if (!argv[argc]) if (!argv[argc])
{ {
err = gpg_error_from_syserror (); err = gpg_error_from_syserror ();
if (err)
goto leave; goto leave;
} }
argc++; argc++;
@ -1307,7 +1283,6 @@ build_argv (engine_gpg_t gpg, const char *pgmname)
if (!argv[argc]) if (!argv[argc])
{ {
err = gpg_error_from_syserror (); err = gpg_error_from_syserror ();
if (err)
goto leave; goto leave;
} }
argc++; argc++;