fd->date = st->st_mtime;
fd->mode = st->st_mode;
fd->ref = 1;
- fd->magick = 0x12345678;
+ fd->magick = FD_MAGICK;
if (disable_sidecars) fd->disable_grouping = TRUE;
#endif
{
if (fd == NULL) return NULL;
- if (fd->magick != 0x12345678)
+ if (fd->magick != FD_MAGICK)
#ifdef DEBUG_FILEDATA
DEBUG_0("fd magick mismatch @ %s:%d fd=%p", file, line, fd);
#else
DEBUG_0("fd magick mismatch fd=%p", fd);
#endif
- g_assert(fd->magick == 0x12345678);
+ g_assert(fd->magick == FD_MAGICK);
fd->ref++;
#ifdef DEBUG_FILEDATA
static void file_data_free(FileData *fd)
{
- g_assert(fd->magick == 0x12345678);
+ g_assert(fd->magick == FD_MAGICK);
g_assert(fd->ref == 0);
metadata_cache_free(fd);
#endif
{
if (fd == NULL) return;
- if (fd->magick != 0x12345678)
+ if (fd->magick != FD_MAGICK)
#ifdef DEBUG_FILEDATA
DEBUG_0("fd magick mismatch @ %s:%d fd=%p", file, line, fd);
#else
DEBUG_0("fd magick mismatch fd=%p", fd);
#endif
- g_assert(fd->magick == 0x12345678);
+ g_assert(fd->magick == FD_MAGICK);
fd->ref--;
#ifdef DEBUG_FILEDATA
{
FileData *fd = work->data;
work = work->next;
- g_assert(fd->magick == 0x12345678);
+ g_assert(fd->magick == FD_MAGICK);
DEBUG_2("basename: %p %s", fd, fd->name);
if (fd->parent)
{
- g_assert(fd->parent->magick == 0x12345678);
+ g_assert(fd->parent->magick == FD_MAGICK);
DEBUG_2(" parent: %p", fd->parent);
}
s_work = fd->sidecar_files;
{
FileData *sfd = s_work->data;
s_work = s_work->next;
- g_assert(sfd->magick == 0x12345678);
+ g_assert(sfd->magick == FD_MAGICK);
DEBUG_2(" sidecar: %p %s", sfd, sfd->name);
}
while (work)
{
FileData *sfd = work->data;
- g_assert(sfd->magick == 0x12345678);
+ g_assert(sfd->magick == FD_MAGICK);
g_assert(sfd->parent == NULL && sfd->sidecar_files == NULL);
sfd->parent = parent_fd;
new_sidecars = g_list_prepend(new_sidecars, sfd);
static void file_data_disconnect_sidecar_file(FileData *target, FileData *sfd)
{
- g_assert(target->magick == 0x12345678);
- g_assert(sfd->magick == 0x12345678);
+ g_assert(target->magick == FD_MAGICK);
+ g_assert(sfd->magick == FD_MAGICK);
g_assert(g_list_find(target->sidecar_files, sfd));
file_data_ref(target);