diff options
author | Matthias Clasen <mclasen@redhat.com> | 2005-10-18 20:32:35 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2005-10-18 20:32:35 +0000 |
commit | fcacded8ff3a23560feba04199005f81aa6a8a74 (patch) | |
tree | 72acd29e3769db24f3150689c230be42018584c6 /gtk/xdgmime/xdgmimecache.c | |
parent | faff0f5f8b82de0c7b53ac8d170269426fda11cb (diff) | |
download | gtk+-fcacded8ff3a23560feba04199005f81aa6a8a74.tar.gz |
Make magic comparisons work correctly in the cache.
2005-10-18 Matthias Clasen <mclasen@redhat.com>
* xdgmimecache.c: Make magic comparisons work correctly
in the cache.
Diffstat (limited to 'gtk/xdgmime/xdgmimecache.c')
-rw-r--r-- | gtk/xdgmime/xdgmimecache.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gtk/xdgmime/xdgmimecache.c b/gtk/xdgmime/xdgmimecache.c index 002b0f20d7..e37abb162b 100644 --- a/gtk/xdgmime/xdgmimecache.c +++ b/gtk/xdgmime/xdgmimecache.c @@ -176,8 +176,8 @@ cache_magic_matchlet_compare_to_data (XdgMimeCache *cache, { for (j = 0; j < data_length; j++) { - if ((cache->buffer[data_offset + j] & cache->buffer[mask_offset + j]) != - ((((unsigned char *) data)[j + i]) & cache->buffer[mask_offset + j])) + if ((((unsigned char *)cache->buffer)[data_offset + j] & ((unsigned char *)cache->buffer)[mask_offset + j]) != + ((((unsigned char *) data)[j + i]) & ((unsigned char *)cache->buffer)[mask_offset + j])) { valid_matchlet = FALSE; break; @@ -188,7 +188,7 @@ cache_magic_matchlet_compare_to_data (XdgMimeCache *cache, { for (j = 0; j < data_length; j++) { - if (cache->buffer[data_offset + j] != ((unsigned char *) data)[j + i]) + if (((unsigned char *)cache->buffer)[data_offset + j] != ((unsigned char *) data)[j + i]) { valid_matchlet = FALSE; break; @@ -296,7 +296,7 @@ cache_alias_lookup (const char *alias) for (i = 0; _caches[i]; i++) { XdgMimeCache *cache = _caches[i]; - xdg_uint32_t list_offset = GET_UINT32 (cache->buffer, 4 ); + xdg_uint32_t list_offset = GET_UINT32 (cache->buffer, 4); xdg_uint32_t n_entries = GET_UINT32 (cache->buffer, list_offset); xdg_uint32_t offset; |