| 85 | return memcmp(a->sha256,b->sha256,sizeof(a->sha256))!=0; |
| 86 | } |
| 87 | static bool gd_read(cbm_store_t *s,const unsigned char *project,size_t len, |
| 88 | cbm_store_graph_digest_t *out) { |
| 89 | cbm_store_read_scope_t *scope=NULL; |
| 90 | int opened=s?cbm_store_read_scope_open(s,NULL,NULL,&scope):CBM_STORE_ERR; |
| 91 | int rc=opened==CBM_STORE_OK?cbm_store_graph_digest(scope,project,len,&gd_room,out):CBM_STORE_GRAPH_DIGEST_ERROR; |
| 92 | int closed=cbm_store_read_scope_close(scope); |
| 93 | return opened==CBM_STORE_OK && rc==CBM_STORE_GRAPH_DIGEST_OK && closed==CBM_STORE_OK; |
| 94 | } |
| 95 | static bool gd_p(cbm_store_t *s,cbm_store_graph_digest_t *out) { |
| 96 | return gd_read(s,(const unsigned char *)"p",1,out); |
| 97 | } |
no test coverage detected