Changeset 592 for trunk/src/sh_socket.c


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

Fixes for compiler warnings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_socket.c

    r583 r592  
    8989int sh_socket_store_uuid(const char * cmd)
    9090{
    91   char * p = sh_util_strdup(cmd);
    92   char * q = strchr(cmd, ':');
     91  const char * q = strchr(cmd, ':');
    9392  char   entry[SH_BUFSIZE];
    9493  SH_DELTA_DB db;
    9594
    96   if (!q) { SH_FREE(p); return -1; }
     95  if (!q) { return -1; }
    9796
    9897  ++q;
    9998
    100   if (0 != sh_uuid_check(q)) { SH_FREE(p); return -1; }
     99  if (0 != sh_uuid_check(q)) { return -1; }
    101100
    102101  db.count = 0;
    103102  db.last_time = (time_t) 0;
    104103  sl_strlcpy(db.uuid, q, SH_UUID_BUF);
    105   SH_FREE(p);
    106104
    107105  if (NULL != unparse_entry(&db, entry, sizeof(entry)))
    … …  
    495493    {
    496494#ifdef S_ISSOCK
    497       if (S_ISSOCK (sbuf.st_mode))
     495      /* cppcheck-suppress syntaxError */
     496      if (S_ISSOCK(sbuf.st_mode))
    498497        {
    499498          retval = retry_aud_unlink (FIL__, __LINE__, sh_sockname);
Note: See TracChangeset for help on using the changeset viewer.