cleanup: silence two compiler warnings in git-access.c

gcc complained about two constructs of the kind
	remote_id && SSRF_INFO("...");
And while I am not a fan of excessive warnings, I must say
it has a point here. That's just code obfuscation. In fact,
it appears that the condition was wrong - the SSRF_INFO
should probably be invoked if remote_id is NULL. The way
it was written it would be invoked if it was *not* NULL.

Change both instances to unfancy if statements.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2020-09-22 21:15:55 +02:00 committed by Dirk Hohndel
parent 9d3b15bf9c
commit fb93232931

View file

@ -505,8 +505,10 @@ static int try_to_update(git_repository *repo, git_remote *origin, git_reference
remote_id = git_reference_target(remote);
if (!local_id || !remote_id) {
local_id && SSRF_INFO("git storage: unable to get local SHA");
remote_id && SSRF_INFO("git storage: unable to get remote SHA");
if (!local_id)
SSRF_INFO("git storage: unable to get local SHA");
if (!remote_id)
SSRF_INFO("git storage: unable to get remote SHA");
if (is_subsurface_cloud)
goto cloud_data_error;
else