IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 37055


Ignore:
Timestamp:
Jul 17, 2014, 11:23:33 AM (12 years ago)
Author:
eugene
Message:

fix optimization issues

Location:
trunk/Ohana/src/libdvo/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/libdvo/src/cmf-ps1-sv3.c

    r37035 r37055  
    1010
    1111  off_t i;
    12   unsigned char *byte, *output;
     12  unsigned char *byte = NULL;
     13  unsigned char *output = NULL;
    1314
    1415  if (size != ST_SIZE) {
  • trunk/Ohana/src/libdvo/src/dvo_convert_PS1_DEV_3.c

    r35162 r37055  
    44
    55// We only provide image and photcode conversion
     6
     7# define RAW_IMAGE_NAME_LEN 128
    68
    79Image *Image_PS1_DEV_3_ToInternal (Image_PS1_DEV_3 *in, off_t Nvalues, off_t Nalloc) {
     
    1820    memcpy (&out[i].coords, &in[i].coords, sizeof(Coords));
    1921
    20     strncpy (out[i].name, in[i].name, 120); // out[121], in[121]
    21     out[i].name[120] = 0; // force termination
     22    // RAW_IMAGE_NAME_LEN > DVO_IMAGE_NAME_LEN
     23    strncpy (out[i].name, in[i].name, DVO_IMAGE_NAME_LEN - 1);
     24    out[i].name[DVO_IMAGE_NAME_LEN - 1] = 0; // force termination
    2225
    2326    out[i].tzero            = in[i].tzero;
     
    7780    memcpy (&out[i].coords, &in[i].coords, sizeof(Coords));
    7881
    79     strncpy (out[i].name, in[i].name, 127); // out[128], in[128]
    80     out[i].name[127] = 0; // force termination
     82    // RAW_IMAGE_NAME_LEN > DVO_IMAGE_NAME_LEN
     83    strncpy (out[i].name, in[i].name, DVO_IMAGE_NAME_LEN - 1);
     84    out[i].name[DVO_IMAGE_NAME_LEN - 1] = 0; // force termination
    8185
    8286    out[i].tzero            = in[i].tzero;
Note: See TracChangeset for help on using the changeset viewer.