[rygel-gst-0-10-plugins] Mostly whitespace fixes.
- From: Krzesimir Nowak <krnowak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel-gst-0-10-plugins] Mostly whitespace fixes.
- Date: Wed, 6 Feb 2013 10:59:57 +0000 (UTC)
commit 467c11c6eb8d7cb96f75ecb6b4a509105f0ad201
Author: Krzesimir Nowak <krnowak openismus com>
Date: Wed Feb 6 11:59:27 2013 +0100
Mostly whitespace fixes.
src/media-export/rygel-media-export-database.c | 31 ++++++++++-------------
1 files changed, 14 insertions(+), 17 deletions(-)
---
diff --git a/src/media-export/rygel-media-export-database.c b/src/media-export/rygel-media-export-database.c
index a46902a..112adec 100644
--- a/src/media-export/rygel-media-export-database.c
+++ b/src/media-export/rygel-media-export-database.c
@@ -187,27 +187,27 @@ rygel_media_export_database_exec_cursor (RygelMediaExportDatabase *self,
GValue *arguments,
int arguments_length,
GError **error) {
- RygelMediaExportDatabaseCursor *result = NULL;
+ RygelMediaExportDatabaseCursor *result;
sqlite3 *db;
- GError *inner_error = NULL;
+ GError *inner_error;
g_return_val_if_fail (RYGEL_MEDIA_EXPORT_IS_DATABASE (self), NULL);
g_return_val_if_fail (sql != NULL, NULL);
db = rygel_media_export_sqlite_wrapper_get_db (RYGEL_MEDIA_EXPORT_SQLITE_WRAPPER (self));
+ inner_error = NULL;
result = rygel_media_export_database_cursor_new (db,
sql,
arguments,
arguments_length,
&inner_error);
- if (inner_error != NULL) {
+ if (inner_error) {
g_propagate_error (error, inner_error);
return NULL;
}
return result;
}
-
/**
* Simple SQL query execution function.
*
@@ -230,7 +230,7 @@ rygel_media_export_database_exec (RygelMediaExportDatabase *self,
g_return_if_fail (sql != NULL);
inner_error = NULL;
- if (arguments == NULL) {
+ if (!arguments) {
RygelMediaExportSqliteWrapper* self_wrapper = RYGEL_MEDIA_EXPORT_SQLITE_WRAPPER (self);
sqlite3* db = rygel_media_export_sqlite_wrapper_get_db (self_wrapper);
@@ -247,14 +247,14 @@ rygel_media_export_database_exec (RygelMediaExportDatabase *self,
arguments,
arguments_length,
&inner_error);
- if (inner_error != NULL) {
+ if (inner_error) {
g_propagate_error (error, inner_error);
return;
}
while (rygel_media_export_database_cursor_has_next (cursor)) {
rygel_media_export_database_cursor_next (cursor, &inner_error);
- if (inner_error != NULL) {
+ if (inner_error) {
g_propagate_error (error, inner_error);
break;
}
@@ -262,7 +262,6 @@ rygel_media_export_database_exec (RygelMediaExportDatabase *self,
g_object_unref (cursor);
}
-
/**
* Execute a SQL query that returns a single number.
*
@@ -278,21 +277,21 @@ rygel_media_export_database_query_value (RygelMediaExportDatabase *self,
int args_length,
GError **error) {
gint result;
- RygelMediaExportDatabaseCursor* cursor;
- sqlite3_stmt* statement;
+ RygelMediaExportDatabaseCursor *cursor;
+ sqlite3_stmt *statement;
GError *inner_error;
- g_return_val_if_fail (RYGEL_MEDIA_EXPORT_DATABASE (self) != NULL, 0);
+ g_return_val_if_fail (RYGEL_MEDIA_EXPORT_IS_DATABASE (self), 0);
g_return_val_if_fail (sql != NULL, 0);
inner_error = NULL;
cursor = rygel_media_export_database_exec_cursor (self, sql, args, args_length, &inner_error);
- if (inner_error != NULL) {
+ if (inner_error) {
g_propagate_error (error, inner_error);
return 0;
}
statement = rygel_media_export_database_cursor_next (cursor, &inner_error);
- if (inner_error != NULL) {
+ if (inner_error) {
g_propagate_error (error, inner_error);
g_object_unref (cursor);
return 0;
@@ -302,7 +301,6 @@ rygel_media_export_database_query_value (RygelMediaExportDatabase *self,
return result;
}
-
/**
* Analyze triggers of database
*/
@@ -317,7 +315,6 @@ rygel_media_export_database_analyze (RygelMediaExportDatabase *self) {
NULL);
}
-
/**
* Special GValue to pass to exec or exec_cursor to bind a column to
* NULL
@@ -328,7 +325,6 @@ rygel_media_export_database_null (GValue *result) {
g_value_set_pointer (result, NULL);
}
-
/**
* Start a transaction
*/
@@ -349,10 +345,11 @@ void rygel_media_export_database_begin (RygelMediaExportDatabase* self, GError**
* Commit a transaction
*/
void rygel_media_export_database_commit (RygelMediaExportDatabase* self, GError** error) {
- GError *inner_error = NULL;
+ GError *inner_error;
g_return_if_fail (RYGEL_MEDIA_EXPORT_IS_DATABASE (self));
+ inner_error = NULL;
rygel_media_export_database_exec (self,
"COMMIT",
NULL,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]