mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
9d3b15bf9c
commit
fb93232931
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue