Fix conflict from remove of ssnprintf2 and align utils/common/common.h
authorZebity Spring <zebity@yahoo.com>
Thu, 24 Oct 2019 11:08:22 +0000 (22:08 +1100)
committerZebity Spring <zebity@yahoo.com>
Thu, 24 Oct 2019 11:08:22 +0000 (22:08 +1100)
1  2 
src/utils/common/common.c

@@@ -89,7 -89,8 +89,7 @@@ char *sstrncpy(char *dest, const char *
    return dest;
  } /* char *sstrncpy */
  
 -/* ssnprintf returns zero on success, one if truncation occurred
 -   and a negative integer onerror. */
 +/* ssnprintf returns result from vsnprintf conistent with snprintf */
  int ssnprintf(char *str, size_t sz, const char *format, ...) {
    va_list ap;
    va_start(ap, format);
    return ret;
  } /* int ssnprintf */
  
- /* ssnprintf2 returns zero on success, one if truncation occurred
-    and a negative integer on error. */
- int ssnprintf2(char *str, size_t sz, const char *format, ...) {
-   va_list ap;
-   va_start(ap, format);
-   int ret = vsnprintf(str, sz, format, ap);
-   va_end(ap);
-   if (ret < 0) {
-     return ret;
-   }
-   return (size_t)ret >= sz;
- } /* int ssnprintf2 */
  char *ssnprintf_alloc(char const *format, ...) /* {{{ */
  {
    char static_buffer[1024] = "";