projects
/
krb5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f96d4b6
)
cci_array_move should work when the source and dest positions are equal
author
Alexandra Ellwood
<lxs@mit.edu>
Tue, 18 Sep 2007 19:48:19 +0000
(19:48 +0000)
committer
Alexandra Ellwood
<lxs@mit.edu>
Tue, 18 Sep 2007 19:48:19 +0000
(19:48 +0000)
Fixed so it does nothing when moving an element to its own index.
ticket: new
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19950
dc483132
-0cff-0310-8789-
dd5450dbe970
src/ccapi/common/cci_array_internal.c
patch
|
blob
|
history
diff --git
a/src/ccapi/common/cci_array_internal.c
b/src/ccapi/common/cci_array_internal.c
index 3d1e35ef3d4cad73eb01df1dcaefc8837e4ba0e4..37ff695e3cff210fe15e2d11a291c554b982f553 100644
(file)
--- a/
src/ccapi/common/cci_array_internal.c
+++ b/
src/ccapi/common/cci_array_internal.c
@@
-270,7
+270,8
@@
cc_int32 cci_array_move (cci_array_t io_array,
move_to = in_position;
move_count = in_new_position - in_position - 1;
real_new_position = in_new_position - 1;
- } else {
+
+ } else if (in_position > in_new_position) {
/* shift left */
move_from = in_new_position;
move_to = in_new_position + 1;