diff options
author | Gustav HÃ¥llberg <gustav@gmail.com> | 2013-07-13 19:50:40 (GMT) |
---|---|---|
committer | Kalev Lember <kalevlember@gmail.com> | 2013-07-13 18:42:10 (GMT) |
commit | 2676fae2cf3a00368f311d52f3941b62005aee72 (patch) | |
tree | d0d3593577c25a1a86c36abb405a9c52af61c0fe /powwow-muc.c | |
parent | df6528300807a0d82870c5c27d411b7a93ee71a6 (diff) | |
download | powwow-2676fae2cf3a00368f311d52f3941b62005aee72.zip powwow-2676fae2cf3a00368f311d52f3941b62005aee72.tar.gz powwow-2676fae2cf3a00368f311d52f3941b62005aee72.tar.bz2 |
stop using bzero() and check a few return values
Diffstat (limited to 'powwow-muc.c')
-rw-r--r-- | powwow-muc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/powwow-muc.c b/powwow-muc.c index c98547e..4f8ae18 100644 --- a/powwow-muc.c +++ b/powwow-muc.c @@ -82,8 +82,8 @@ int main( int argc, char *argv[] ) { timeout( 0 ); looping = 1; while( looping ) { - bzero( line, 1000 ); - fgets( line, 1000, in ); + memset( line, 0, sizeof line ); + fgets( line, sizeof line, in ); /* get file pos */ new_pos = curr_pos = ftell( in ); @@ -284,7 +284,7 @@ int main( int argc, char *argv[] ) { /* read to next newline so we don't break up lines seeking around */ - fgets( line, 1000, in ); + fgets( line, sizeof line, in ); new_pos = ftell( in ); /* Make a note of moving */ |