diff options
author | Michael Schroeder <mls@suse.de> | 2014-04-07 13:01:43 +0200 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2014-04-07 13:01:43 +0200 |
commit | 86e8dd2dcdd9c6c0de4a78ea9a039c9b64440757 (patch) | |
tree | 40cb48979ad188b77b45b936e7214e102d8559fc | |
parent | 657a22165436c4f0791c869ca953c55b43d55aee (diff) | |
download | libsolv-86e8dd2dcdd9c6c0de4a78ea9a039c9b64440757.tar.gz libsolv-86e8dd2dcdd9c6c0de4a78ea9a039c9b64440757.tar.bz2 libsolv-86e8dd2dcdd9c6c0de4a78ea9a039c9b64440757.zip |
also simplify solvable_copy_cb's checksum handling
-rw-r--r-- | ext/repo_rpmdb.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/ext/repo_rpmdb.c b/ext/repo_rpmdb.c index 52daaba..9139fd1 100644 --- a/ext/repo_rpmdb.c +++ b/ext/repo_rpmdb.c @@ -1600,15 +1600,12 @@ solvable_copy_cb(void *vcbdata, Solvable *r, Repodata *fromdata, Repokey *key, K cbdata->handle = repodata_new_handle(data); repodata_add_flexarray(data, cbdata->subhandle, keyname, cbdata->handle); break; - case REPOKEY_TYPE_MD5: - case REPOKEY_TYPE_SHA1: - case REPOKEY_TYPE_SHA224: - case REPOKEY_TYPE_SHA256: - case REPOKEY_TYPE_SHA384: - case REPOKEY_TYPE_SHA512: - repodata_set_bin_checksum(data, handle, keyname, key->type, (const unsigned char *)kv->str); - break; default: + if (solv_chksum_len(key->type)) + { + repodata_set_bin_checksum(data, handle, keyname, key->type, (const unsigned char *)kv->str); + break; + } break; } return 0; |