vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Fine group, Here are a few questions after a few minutes just scanning the code. Mitchell Erblich Sr Software Engineer --------------------- parse.y : 1.139 parse_config() There are three calloc's in a row. After the 2nd and third calloc's failed attempts their should be frees of the conf and the conf/mrtconf structs. Else, it looks like a memory leak. new_peer() Calls alloc_peer() but doesn't check if p is NULL and return with a NULL if so. Why not? bgpd.c sighdlr() Should have a default case. main() getuid() returns the effective user id. Shouldn't you print the value when you print "need root privileges". Erblichs wrote: > > Lets start small.... > > Suggested code changes: > > General: > Should new lines be printed before each header? > > Should all of your shows count the number of > printed lines and generate a new header or > pause every so many lines?? This would prevent > everything from just scrolling off the terminal > when their are a large number of lines to be > printed. > > show_neighbor_msg() > IMSG_CTL_END: ?break? The break should generate a > unreachable statement msg from the > compiler. Thus it should be > removed after the return. > > Shouldn't the switch(nv) have a default case? > > print_timer() > Does it make sense to get "not running" interval? > Thus I would suggest to add braces and a return > after you print "not running". > > get_linkstate() > int i; -> u_int i = 0; > for ( i = 0; -> for (; > > This is to make sure that if their was some > looping issue in the future that your arrays > wouldn't be subscripted with negative values. > > print_baudrate() > it is my undersdanding that Gb defines gigabit > and GB defines gigabyte thus, minimally > > XBit -> Xb or Xbit > > Mitchell Erblich |