Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chpock committed May 28, 2024
1 parent d1e5ae2 commit 5910cbb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 1 addition & 0 deletions generic/fsindexIO.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ Cookfs_Fsindex *Cookfs_FsindexFromObject(Cookfs_Fsindex *fsindex, Tcl_Obj *o) {

CookfsLog(printf("Cookfs_FsindexFromObject - Import directory done - %d vs %d", i, objLength))
if (i < objLength) {
// cppcheck-suppress unreadVariable symbolName=i
i = CookfsFsindexImportMetadata(result, bytes, objLength, i);
}

Expand Down
8 changes: 3 additions & 5 deletions generic/readerchannel.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ Tcl_Channel Cookfs_CreateReaderchannel(Cookfs_Pages *pages, Cookfs_Fsindex *fsin

CookfsLog(printf("Cookfs_CreateReaderchannel: welcome"))

if (entry == NULL) {
return NULL;
}

if (listObj != NULL) {

if (Tcl_ListObjGetElements(interp, listObj, &listObjc, &listObjv) != TCL_OK) {
Expand All @@ -61,9 +57,11 @@ Tcl_Channel Cookfs_CreateReaderchannel(Cookfs_Pages *pages, Cookfs_Fsindex *fsin
return NULL;
}

} else {
} else if (entry != NULL) {
CookfsLog(printf("Cookfs_CreateReaderchannel: init by fsindex entry [%p]", (void *)entry));
listObjc = entry->fileBlocks * 3;
} else {
return NULL;
}

instData = Cookfs_CreateReaderchannelAlloc(pages, fsindex, listObjc);
Expand Down

0 comments on commit 5910cbb

Please sign in to comment.