Skip to content
  • Su Hang's avatar
    a1515161
    util/uri.c: wrap single statement blocks with braces {} · a1515161
    Su Hang authored
    
    
    For this patch, using curly braces to wrap `if` `while` `else` statements,
    which only hold single statement. For example:
    '''
    if (cond)
        statement;
    '''
    to
    '''
    if (cond) {
        statement;
    }
    '''
    
    And using tricks that compare the disassemblies before and after
    code changes, to make sure code logic isn't changed:
    '''
    git checkout master
    make util/uri.o
    strip util/uri.o
    objdump -Drx util/uri.o > /tmp/uri-master.txt
    git checkout cleanupbranch
    make util/uri.o
    strip util/uri.o
    objdump -Drx util/uri.o > /tmp/uri-cleanup.txt
    
    Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
    a1515161
    util/uri.c: wrap single statement blocks with braces {}
    Su Hang authored
    
    
    For this patch, using curly braces to wrap `if` `while` `else` statements,
    which only hold single statement. For example:
    '''
    if (cond)
        statement;
    '''
    to
    '''
    if (cond) {
        statement;
    }
    '''
    
    And using tricks that compare the disassemblies before and after
    code changes, to make sure code logic isn't changed:
    '''
    git checkout master
    make util/uri.o
    strip util/uri.o
    objdump -Drx util/uri.o > /tmp/uri-master.txt
    git checkout cleanupbranch
    make util/uri.o
    strip util/uri.o
    objdump -Drx util/uri.o > /tmp/uri-cleanup.txt
    
    Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
Loading