mirror of
https://github.com/moparisthebest/pacman
synced 2025-02-28 17:31:52 -05:00
added coding standard
Signed-off-by: Barbu Paul - Gheorghe <barbu.paul.gheorghe@gmail.com>
This commit is contained in:
parent
a50d1bc9ab
commit
527ae7092d
44
HACKING
44
HACKING
@ -101,6 +101,50 @@ alpm_list_t *alpm_list_add(alpm_list_t *list, void *data)
|
||||
NOT
|
||||
for(a=0;a<n&&n>0;a++,n--) {}
|
||||
|
||||
9. Declare all variables at the start of the block.
|
||||
[source,C]
|
||||
-------------------------------------------
|
||||
int SYMEXPORT alpm_db_remove_server(alpm_db_t *db, const char *url)
|
||||
{
|
||||
char *newurl, *vdata = NULL;
|
||||
|
||||
newurl = url;
|
||||
if(!newurl) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
...
|
||||
|
||||
if(vdata) {
|
||||
...
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
-------------------------------------------
|
||||
|
||||
NOT
|
||||
|
||||
[source,C]
|
||||
-------------------------------------------
|
||||
int SYMEXPORT alpm_db_remove_server(alpm_db_t *db, const char *url)
|
||||
{
|
||||
char *newurl = url;
|
||||
|
||||
if(!newurl) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
char *vdata = NULL;
|
||||
|
||||
if(vdata) {
|
||||
...
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
-------------------------------------------
|
||||
|
||||
|
||||
Other Concerns
|
||||
--------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user