IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 31, 2023, 10:55:31 AM (3 years ago)
Author:
eugene
Message:

convert instances of strncpy to strncpy_nowarn (or memcpy in specific cases where ending 0 is not desired)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20220316/Ohana/src/opihi/cmd.data/wd.c

    r41674 r42343  
    115115      Ns = strlen (simple);
    116116      No = 80 - Ns;
    117       strncpy (temp_header.buffer, simple, Ns);
     117      strncpy_nowarn (temp_header.buffer, simple, Ns);
    118118      memset (&temp_header.buffer[Ns], ' ', No);
    119119    }
     
    275275  return (f);
    276276}
    277 
    278 
    279 ///    /* fix up header */
    280 ///    {
    281 ///      static char simple[] = "XTENSION= 'IMAGE  '            / Image extension";
    282 ///      int Ns, No;
    283 ///      Ns = strlen (simple);
    284 ///      No = 80 - Ns;
    285 ///      strncpy (temp_header.buffer, simple, Ns);
    286 ///      memset (&temp_header.buffer[Ns], ' ', No);
    287 ///    }
    288 ///
    289 ///    /* position to end of file to write new extend */
    290 ///    fseeko (f, 0LL, SEEK_END);
    291 ///    nbytes = fwrite (temp_header.buffer, 1, temp_header.datasize, f);
    292 ///    fclose (f);
    293 ///    if (nbytes != temp_header.datasize) {
    294 ///      gprint (GP_ERR, "failed to write file\n");
    295 ///      status = FALSE;
    296 ///      goto done1;
    297 ///    }
    298 ///
    299 ///  }
Note: See TracChangeset for help on using the changeset viewer.