/[svn]/ircd-hybrid/branches/8.2.x/src/dbuf.c
ViewVC logotype

Diff of /ircd-hybrid/branches/8.2.x/src/dbuf.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 6964 by michael, Fri Sep 11 16:33:52 2015 UTC revision 6965 by michael, Fri Dec 18 19:53:34 2015 UTC
# Line 112  dbuf_put_args(struct dbuf_block *dbuf, c Line 112  dbuf_put_args(struct dbuf_block *dbuf, c
112    assert(dbuf->refs == 1);    assert(dbuf->refs == 1);
113    
114    dbuf->size += vsnprintf(dbuf->data + dbuf->size, sizeof(dbuf->data) - dbuf->size, data, args);    dbuf->size += vsnprintf(dbuf->data + dbuf->size, sizeof(dbuf->data) - dbuf->size, data, args);
115    
116      /*
117       * As per C99, (v)snprintf returns the length the resulting string would be
118       */
119    if (dbuf->size > sizeof(dbuf->data))    if (dbuf->size > sizeof(dbuf->data))
120      dbuf->size = sizeof(dbuf->data); /* required by some versions of vsnprintf */      dbuf->size = sizeof(dbuf->data);
121  }  }
122    
123  void  void

Legend:
Removed from v.6964  
changed lines
  Added in v.6965

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28