VirtualBox

Changeset 55581 in vbox


Ignore:
Timestamp:
May 1, 2015 11:01:59 AM (9 years ago)
Author:
vboxsync
Message:

VBoxServiceControlSession.cpp: A few more constructive code review comments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControlSession.cpp

    r55580 r55581  
    142142        uint32_t uFlagsRemRec = 0;
    143143        bool fRecursive = false;
     144/** @todo r=bird: Unnecessary variable fRecursive.  You can check for
     145 * DIRREMOVE_FLAG_RECURSIVE directly in the flags when deciding which API to
     146 * call. */
    144147
    145148        if (!(uFlags & ~DIRREMOVE_FLAG_VALID_MASK))
     
    151154                fRecursive = true;
    152155            }
    153 
     156/** @todo r=bird: Understand how APIs you use work (read docs, check constant,
     157 * check code). If you check the actual values of RTDIRRMREC_F_CONTENT_AND_DIR
     158 * and RTDIRRMREC_F_CONTENT_ONLY, you'd notice that the first one is 0 and the
     159 * second is 1.  This code is a little confused about how it all works, though
     160 * it ends up doing the right thing as if by accident almost. */
    154161            if (uFlags & DIRREMOVE_FLAG_CONTENT_AND_DIR)
    155162            {
     
    170177                           szDir, uFlags, fRecursive);
    171178
     179/** @todo r=bird: Convoluted code flow. It would be shorter and easier to
     180 * read if you moved this code up and into the flags-are-valid if body. */
    172181        if (RT_SUCCESS(rc))
    173182        {
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette