Changeset 2413


Ignore:
Timestamp:
Jul 19, 2007, 12:57:26 AM (15 years ago)
Author:
joshe
Message:

bzero -> memset

Location:
trunk/daemon
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/daemon/client.c

    r2400 r2413  
    146146    gl_proxy = 0;
    147147
    148     bzero( &sun, sizeof sun );
     148    memset( &sun, 0, sizeof sun );
    149149    sun.sun_family = AF_LOCAL;
    150150    strlcpy( sun.sun_path, path, sizeof sun.sun_path );
     
    902902    }
    903903
    904     bzero( &key, sizeof key );
     904    memset( &key, 0, sizeof key );
    905905    key.tag = tag;
    906906    resp = RB_FIND( resptree, &gl_resps, &key );
     
    954954    }
    955955
    956     bzero( &key, sizeof key );
     956    memset( &key, 0, sizeof key );
    957957    key.tag = tag;
    958958    resp = RB_FIND( resptree, &gl_resps, &key );
     
    10191019    }
    10201020
    1021     bzero( &key, sizeof key );
     1021    memset( &key, 0, sizeof key );
    10221022    key.tag = tag;
    10231023    resp = RB_FIND( resptree, &gl_resps, &key );
  • trunk/daemon/daemon.c

    r2400 r2413  
    224224    }
    225225
    226     bzero( &lk, sizeof lk );
     226    memset( &lk, 0, sizeof lk );
    227227    lk.l_start  = 0;
    228228    lk.l_len    = 0;
     
    263263    }
    264264
    265     bzero( &sun, sizeof sun );
     265    memset( &sun, 0, sizeof sun );
    266266    sun.sun_family = AF_LOCAL;
    267267    strlcpy( sun.sun_path, path, sizeof sun.sun_path );
  • trunk/daemon/proxy.c

    r2400 r2413  
    199199    int                fd;
    200200
    201     bzero( &sun, sizeof sun );
     201    memset( &sun, 0, sizeof sun );
    202202    sun.sun_family = AF_LOCAL;
    203203    if( NULL == path )
  • trunk/daemon/remote.c

    r2400 r2413  
    289289
    290290    gotmsg = 0;
    291     bzero( opts, sizeof *opts );
     291    memset( opts, 0, sizeof *opts );
    292292    opts->type = CONF_PATH_TYPE_DAEMON;
    293293    SLIST_INIT( &opts->files );
     
    493493
    494494    /* try to look up the hash in the hash tree */
    495     bzero( &key, sizeof key );
     495    memset( &key, 0, sizeof key );
    496496    strlcpy( key.hash, listitem->str, sizeof key.hash );
    497497    treeitem = RB_FIND( torhashes, &gl_hashids, &key );
     
    623623    }
    624624
    625     bzero( &key, sizeof key );
     625    memset( &key, 0, sizeof key );
    626626    key.id = cinfo->id;
    627627    tinfo = RB_FIND( torlist, &gl_torinfo, &key );
     
    668668    }
    669669
    670     bzero( &key, sizeof key );
     670    memset( &key, 0, sizeof key );
    671671    key.id = st->id;
    672672    info = RB_FIND( torlist, &gl_torinfo, &key );
     
    719719    }
    720720
    721     bzero( &key, sizeof key );
     721    memset( &key, 0, sizeof key );
    722722    strlcpy( key.hash, inf->hash, sizeof key.hash );
    723723    found = RB_FIND( torhashes, &gl_hashids, &key );
     
    841841
    842842    ret = -1;
    843     bzero( &key, sizeof key );
     843    memset( &key, 0, sizeof key );
    844844
    845845    for( ii = 0; ARRAYLEN( reqs ) > ii; ii++)
  • trunk/daemon/server.c

    r2400 r2413  
    302302    }
    303303
    304     bzero( &key, sizeof key );
     304    memset( &key, 0, sizeof key );
    305305    key.ev = ev;
    306306    client = RB_FIND( allclients, &gl_clients, &key );
  • trunk/daemon/torrents.c

    r2400 r2413  
    279279    assert( !gl_exiting );
    280280
    281     bzero( buf, sizeof buf );
     281    memset( buf, 0, sizeof buf );
    282282    for( ii = 0; sizeof( hash ) > ii; ii++ )
    283283    {
     
    658658    if( stillmore )
    659659    {
    660         bzero( &tv, sizeof tv );
     660        memset( &tv, 0, sizeof tv );
    661661        tv.tv_sec  = TIMER_SECS;
    662662        tv.tv_usec = TIMER_USECS;
     
    883883    struct tor key, * found;
    884884
    885     bzero( &key, sizeof key );
     885    memset( &key, 0, sizeof key );
    886886    key.id = id;
    887887    found = RB_FIND( tortree, &gl_tree, &key );
     
    895895    struct tor key, * found;
    896896
    897     bzero( &key, sizeof key );
     897    memset( &key, 0, sizeof key );
    898898    memcpy( key.hash, hash, sizeof key.hash );
    899899    found = RB_FIND( hashtree, &gl_hashes, &key );
Note: See TracChangeset for help on using the changeset viewer.