Changeset 592 for trunk/src/sh_sig.c


Ignore:
Timestamp:
Oct 31, 2026, 7:16:07 PM (3 days ago)
Author:
katerina
Message:

Fixes for compiler warnings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_sig.c

    r579 r592  
    645645  int    flag_sig  = S_FALSE;
    646646  SL_TICKET fdTmp  = (-1);
    647   SL_TICKET open_tmp (void);
     647  SL_TICKET open_tmp  (void);
     648  int       close_tmp ( SL_TICKET);
    648649
    649650  /* extract the data and copy to temporary file
    … …  
    660661
    661662  fin_cp = fdopen(dup(get_the_fd(fd)), "rb");
     663  if (!fin_cp) { close_tmp(fdTmp); return -1; }
    662664  buf = SH_ALLOC(fgets_buf_size);
    663 
     665 
    664666  while (NULL != fgets(buf, fgets_buf_size, fin_cp))
    665667    {
    … …  
    720722  fin_cp = fdopen(dup(get_the_fd(fdTmp)), "rb");
    721723  FILE * fout = fopen("xxx.out", "w+");
     724  if (!fout) { close_tmp(fdTmp); return -1; }
     725  if (!fin_cp) { close_tmp(fdTmp); fclose(fout); return -1; }
    722726  while (NULL != fgets(buf, fgets_buf_size, fin_cp))
    723727    {
    … …  
    15981602  int    flag_nohead = S_FALSE;
    15991603  SL_TICKET fdTmp = (-1);
    1600   SL_TICKET open_tmp (void);
    1601 
     1604  SL_TICKET open_tmp  (void);
     1605  int       close_tmp ( SL_TICKET);
     1606 
    16021607  /* extract the data and copy to temporary file
    16031608   */
    … …  
    16131618
    16141619  fin_cp = fdopen(dup(get_the_fd(fd)), "rb");
     1620  if (!fin_cp) { close_tmp(fdTmp); return -1; }
    16151621  buf = SH_ALLOC(fgets_buf_size);
    1616 
     1622 
    16171623  while (NULL != fgets(buf, fgets_buf_size, fin_cp))
    16181624    {
Note: See TracChangeset for help on using the changeset viewer.