comparison src/libpst.c @ 69:63c02a242ca9

minor code cleanup
author Carl Byington <carl@five-ten-sg.com>
date Sat, 10 May 2008 12:45:23 -0700
parents cfd6175f9334
children 3cb02cb1e6cd
comparison
equal deleted inserted replaced
68:0616a2ee9c48 69:63c02a242ca9
4042 return 1; 4042 return 1;
4043 } 4043 }
4044 4044
4045 4045
4046 pst_index_ll* pst_getID(pst_file* pf, uint64_t id) { 4046 pst_index_ll* pst_getID(pst_file* pf, uint64_t id) {
4047 pst_index_ll *ptr = NULL; 4047 pst_index_ll *ptr;
4048 DEBUG_ENT("pst_getID"); 4048 DEBUG_ENT("pst_getID");
4049 if (id == 0) { 4049 if (id == 0) {
4050 DEBUG_RET(); 4050 DEBUG_RET();
4051 return NULL; 4051 return NULL;
4052 } 4052 }
4054 //if (id & 1) DEBUG_INDEX(("have odd id bit %#llx\n", id)); 4054 //if (id & 1) DEBUG_INDEX(("have odd id bit %#llx\n", id));
4055 //if (id & 2) DEBUG_INDEX(("have two id bit %#llx\n", id)); 4055 //if (id & 2) DEBUG_INDEX(("have two id bit %#llx\n", id));
4056 id -= (id & 1); 4056 id -= (id & 1);
4057 4057
4058 DEBUG_INDEX(("Trying to find %#llx\n", id)); 4058 DEBUG_INDEX(("Trying to find %#llx\n", id));
4059 if (!ptr) ptr = pf->i_head; 4059 ptr = pf->i_head;
4060 while (ptr && (ptr->id != id)) { 4060 while (ptr && (ptr->id != id)) {
4061 ptr = ptr->next; 4061 ptr = ptr->next;
4062 } 4062 }
4063 if (ptr) {DEBUG_INDEX(("Found Value %#llx\n", id)); } 4063 if (ptr) {DEBUG_INDEX(("Found Value %#llx\n", id)); }
4064 else {DEBUG_INDEX(("ERROR: Value %#llx not found\n", id)); } 4064 else {DEBUG_INDEX(("ERROR: Value %#llx not found\n", id)); }