IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 7994


Ignore:
Timestamp:
Jul 27, 2006, 2:01:57 PM (20 years ago)
Author:
eugene
Message:

added checks for N < 2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/gastro2/src/sort.c

    r2442 r7994  
    66  double tX, tY, tR;
    77 
     8  if (N < 2) return;
     9
    810  l = N >> 1;
    911  ir = N - 1;
     
    5254  double tX, tY, tS;
    5355 
     56  if (N < 2) return;
     57
    5458  l = N >> 1;
    5559  ir = N - 1;
     
    9599void sort (double *X, int N) {
    96100
     101  if (N < 2) return;
     102
    97103  int l,j,ir,i;
    98104  double tmp;
     
    132138  StarData tempstar;
    133139 
     140  if (N < 2) return;
     141
    134142  l = N >> 1;
    135143  ir = N - 1;
     
    165173  StarData tempstar;
    166174 
     175  if (N < 2) return;
     176
    167177  l = N >> 1;
    168178  ir = N - 1;
Note: See TracChangeset for help on using the changeset viewer.