openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/rsyslog/8.1903.0-r0/rsyslog-8.1903.0/plugins/imuxsock/imuxsock.c
static int copyescaped(uchar* dstbuf, uchar* inbuf, int inlen)
{
    int iDst, iSrc;

    *dstbuf = '"';
    for (iDst = 1, iSrc = 0; iSrc < inlen; ++iDst, ++iSrc)
    {
        if (inbuf[iSrc] == '"' || inbuf[iSrc] == '\\')
        {
            dstbuf[iDst++] = '\\';
        }
        dstbuf[iDst] = inbuf[iSrc];
    }
    dstbuf[iDst++] = '"';
    return iDst;
}
/* copy a trusted property in escaped mode. That is, the property can contain
 * any character and so it must be properly quoted AND escaped.
 * It is assumed the output buffer is large enough. Returns the number of
 * characters added.
 */
copy a trusted property in escaped mode. That is, the property can contain
any character and so it must be properly quoted AND escaped.
It is assumed the output buffer is large enough. Returns the number of
characters added.
copy a trusted property in escaped mode . That is the property can contain any character and so it must be properly quoted AND escaped . It is assumed the output buffer is large enough . Returns the number of characters added .
static int copyescaped(uchar* dstbuf, uchar* inbuf, int inlen)
{
    int iDst, iSrc;
    *dstbuf = '"';
    for (iDst = 1, iSrc = 0; iSrc < inlen; ++iDst, ++iSrc)
    {
        if (inbuf[iSrc] == '"' || inbuf[iSrc] == '\\')
        {
            dstbuf[iDst++] = '\\';
        }
        dstbuf[iDst] = inbuf[iSrc];
    }
    dstbuf[iDst++] = '"';
    return iDst;
}
static int copyescaped ( uchar * dstbuf , uchar * inbuf , int inlen ) { int iDst , iSrc ; * dstbuf = ' ' ; for ( iDst = 1 , iSrc = 0 ; iSrc < inlen ; ++ iDst , ++ iSrc ) { if ( inbuf [ iSrc ] == ' ' || inbuf [ iSrc ] == ' \\ ' ) { dstbuf [ iDst ++ ] = ' \\ ' ; } dstbuf [ iDst ] = inbuf [ iSrc ] ; } dstbuf [ iDst ++ ] = ' ' ; return iDst ; }
copy a trusted property in escaped mode.
copy a trusted property in escaped mode .