Skip to content

Instantly share code, notes, and snippets.

@iammattcoleman
Last active September 22, 2020 17:30
Show Gist options
  • Save iammattcoleman/793b5589fdb4eefe940662c4c7f90e41 to your computer and use it in GitHub Desktop.
Save iammattcoleman/793b5589fdb4eefe940662c4c7f90e41 to your computer and use it in GitHub Desktop.
RFC: libvirt coding style
virBufferAddLit(&query, CIM_DATAFILE_WQL_SELECT
"WHERE "
"Name='c:\\\\windows\\\\system32\\\\vmms.exe'");
virBufferAddLit(&query, CIM_DATAFILE_WQL_SELECT "WHERE "
"Name='c:\\\\windows\\\\system32\\\\vmms.exe'");
virBufferAddLit(&query, CIM_DATAFILE_WQL_SELECT
"WHERE Name='c:\\\\windows\\\\system32\\\\vmms.exe'");
@iammattcoleman
Copy link
Author

Assume there's an included header containing...

#define CIM_DATAFILE_WQL_SELECT \
    "SELECT * FROM CIM_DataFile "

Which form is most readable to libvirt developers? I'd like my contributions to fit in with the rest of the codebase.

I prefer #3, but the second line is 82 characters.

@Conan-Kudo
Copy link

I personally prefer option 3 too...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment