author | Nicolas Pitre <nico@cam.org> | |
Mon, 26 Feb 2007 19:55:56 +0000 (14:55 -0500) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 27 Feb 2007 09:34:21 +0000 (01:34 -0800) | ||
commit | 2b87c45ba6f8950ffc44cb6a3c861ad2e5f176a8 | |
tree | 34eb60eb9067ed846e08579f5d8be11451e123e6 | tree | snapshot |
parent | d65a16f6c45c9b2a16f3abc45f727dc6507c853d | commit | diff |
sha1_file.c: cleanup "offset" usage
First there are too many offsets there and it is getting confusing.
So 'offset' is now 'curpos' to distinguish from other offsets like
'obj_offset'.
Then structures like x = foo(x, &y) are now done as y = foo(&x).
It looks more natural that the result y be returned directly and
x be passed as reference to be updated in place. This has the effect
of reducing some line length and removing a few, needing a bit less
stack space, and it even reduces the compiled code size.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
First there are too many offsets there and it is getting confusing.
So 'offset' is now 'curpos' to distinguish from other offsets like
'obj_offset'.
Then structures like x = foo(x, &y) are now done as y = foo(&x).
It looks more natural that the result y be returned directly and
x be passed as reference to be updated in place. This has the effect
of reducing some line length and removing a few, needing a bit less
stack space, and it even reduces the compiled code size.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
sha1_file.c | diff | blob | history |