Linus Torvalds <torvalds@osdl.org> writes:That sounds sensible. Since I saw a patch that touches only one place, I thought I'd better point this out... There are a few more places that knows about this ((char*)base_pointer + (entry_count * 24)) magic in our code. $ git grep -n -e '24 *\*' -e '\* *24' master -- '*.c' master:pack-objects.c:159: long hl = *((long *)(index + 24 * i)); This is yours. master:sha1_file.c:447: if (idx_size != 4*256 + nr * 24 + 20 + 20) master:sha1_file.c:1148: memcpy(sha1, (index + 24 * n + 4), 20); master:sha1_file.c:1162: int cmp = memcmp(index + 24 * mi + 4, sha1, 20); These three should be OK, I think. master:sha1_file.c:1164: e->offset = ntohl(*((int*)(index + 24 * mi))); This you might want to look at; I suspect it is what Linus suggests. Also we _might_ have uglier magic that assumes the base_pointer to be a pointer to a 4-byte integer and uses offset of multiple of 6 instead of 24, although I do not think it is likely. I have to leave the keyboard in a few minutes so I cannot verify nor fix them myself for the next 8 hours or so. Sorry. Is uint32_t guaranteed to be exactly 32-bit, or merely enough to hold 32-bit? - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Greg Kroah-Hartman | [PATCH 002/196] Chinese: rephrase English introduction in HOWTO |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Amit K. Arora | [RFC] Heads up on sys_fallocate() |
| Linus Torvalds | Re: 2.6.25-rc2 System no longer powers off after suspend-to-disk. Screen becomes g... |
git: | |
| David Miller | [GIT]: Networking |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Ray Lee | Re: [BUG] New Kernel Bugs |
