FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor


 
 
LinkBack Thread Tools
 
Old 07-31-2012, 06:24 PM
Barbu Paul - Gheorghe
 
Default added coding standard

Signed-off-by: Barbu Paul - Gheorghe <barbu.paul.gheorghe@gmail.com>
---
HACKING | 44 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)

diff --git a/HACKING b/HACKING
index 8a59344..e859bd8 100644
--- a/HACKING
+++ b/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
--------------
--
Barbu Paul - Gheorghe
Common sense is not so common - Voltaire
Visit My GitHub profile to see my open-source projects - https://github.com/paullik
 

Thread Tools




All times are GMT. The time now is 12:23 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org