summaryrefslogtreecommitdiff
path: root/apps/tagcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/tagcache.c')
-rw-r--r--apps/tagcache.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/apps/tagcache.c b/apps/tagcache.c
index c18380854e..b6d15e7a1f 100644
--- a/apps/tagcache.c
+++ b/apps/tagcache.c
@@ -2258,17 +2258,12 @@ static int tempbuf_sort(int fd)
2258 while (idlist->next != NULL) 2258 while (idlist->next != NULL)
2259 idlist = idlist->next; 2259 idlist = idlist->next;
2260 2260
2261 ALIGN_BUFFER(tempbuf_pos, tempbuf_left, alignof(struct tempbuf_id_list));
2261 tempbuf_left -= sizeof(struct tempbuf_id_list); 2262 tempbuf_left -= sizeof(struct tempbuf_id_list);
2262 if (tempbuf_left - 4 < 0) 2263 if (tempbuf_left < 0)
2263 return -1; 2264 return -1;
2264 2265
2265 idlist->next = (struct tempbuf_id_list *)&tempbuf[tempbuf_pos]; 2266 idlist->next = (struct tempbuf_id_list *)&tempbuf[tempbuf_pos];
2266 if (tempbuf_pos & 0x03)
2267 {
2268 tempbuf_pos = (tempbuf_pos & ~0x03) + 0x04;
2269 tempbuf_left -= 3;
2270 idlist->next = (struct tempbuf_id_list *)&tempbuf[tempbuf_pos];
2271 }
2272 tempbuf_pos += sizeof(struct tempbuf_id_list); 2267 tempbuf_pos += sizeof(struct tempbuf_id_list);
2273 2268
2274 idlist = idlist->next; 2269 idlist = idlist->next;