X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=TP_7%2Fexo1%2Fexo1.c;h=6509b0635333c8196cc7540b67f888bd9ab6c8c3;hb=2f54ac48ef2c4ab4e87426c2bf89b9f5eef7008b;hp=c3ae354589f55c6abdf52b30554a7fb10c8dd893;hpb=26c30d17565a3c8116fa963f19d8f97a1acff914;p=TD_C.git diff --git a/TP_7/exo1/exo1.c b/TP_7/exo1/exo1.c index c3ae354..6509b06 100644 --- a/TP_7/exo1/exo1.c +++ b/TP_7/exo1/exo1.c @@ -17,11 +17,9 @@ void xorSwap (int *v1, int *v2) { } void swap(int* v1, int* v2) { - if (v1 != v2) { - int tmp = *v1; - *v1 = *v2; - *v2 = tmp; - } + int tmp = *v1; + *v1 = *v2; + *v2 = tmp; } void displayArray(int* array, int count) {