[asterisk-commits] ivaxer: branch ivaxer/ast_storage r276117 - /team/ivaxer/ast_storage/main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jul 13 13:39:39 CDT 2010


Author: ivaxer
Date: Tue Jul 13 13:39:36 2010
New Revision: 276117

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=276117
Log:
added missed braces

Modified:
    team/ivaxer/ast_storage/main/storage.c

Modified: team/ivaxer/ast_storage/main/storage.c
URL: http://svnview.digium.com/svn/asterisk/team/ivaxer/ast_storage/main/storage.c?view=diff&rev=276117&r1=276116&r2=276117
==============================================================================
--- team/ivaxer/ast_storage/main/storage.c (original)
+++ team/ivaxer/ast_storage/main/storage.c Tue Jul 13 13:39:36 2010
@@ -63,8 +63,9 @@
 
 	AST_RWLIST_INSERT_TAIL(&storage_engines, tmp, list);
 	AST_RWLIST_UNLOCK(&storage_engines);
-	if (option_verbose > 1)
+	if (option_verbose > 1) {
 		ast_verbose(VERBOSE_PREFIX_2 "Registered storage engine '%s'\n", be->name);
+	}
 
 	return 0;
 }
@@ -154,8 +155,9 @@
 
 int ast_storage_open(struct ast_storage_fileinst *fi, int flags)
 {
-	if (!fi)
+	if (!fi) {
 		return -1;
+	}
 
 	fi->fd = open(fi->localfile, flags);
 	return fi->fd;
@@ -165,12 +167,14 @@
 {
 	int ret = -1;
 
-	if(!fi)
+	if(!fi) {
 		return -1;
+	}
 
 	ret = close(fi->fd);
-	if (!ret)
+	if (!ret) {
 		fi->fd = -1;
+	}
 	return ret;
 }
 
@@ -191,8 +195,9 @@
 
 int ast_storage_copy(struct ast_storage *st, struct ast_storage_fileobject *from, struct ast_storage_fileobject *to)
 {
-	if (st && st->be->copy)
+	if (st && st->be->copy) {
 		return st->be->copy(st, from, to);
+	}
 	/* TODO: implement using the get and put functions */
 	return -1;
 }
@@ -205,8 +210,9 @@
 void ast_storage_fileobject_release(struct ast_storage_fileobject *fo) {
 	struct ast_storage_fileinst *inst;
 
-	if (!fo)
+	if (!fo) {
 		return;
+	}
 
 	AST_RWLIST_TRAVERSE_SAFE_BEGIN(&fo->files, inst, list) {
 		AST_RWLIST_REMOVE_CURRENT(list);
@@ -234,8 +240,9 @@
 void ast_storage_dirobject_release(struct ast_storage_dirobject *dobj) {
 	struct ast_storage_fileobject *fo;
 
-	if (!dobj)
+	if (!dobj) {
 		return;
+	}
 
 	AST_RWLIST_TRAVERSE_SAFE_BEGIN(&dobj->fileobjects, fo, list) {
 		AST_RWLIST_REMOVE_CURRENT(list);




More information about the asterisk-commits mailing list