Commits

Greg Ward committed e49a4a9

svn: fix coding style; improve error messages.

Comments (0)

Files changed (1)

-
 /*
  * Copyright (C) 2009-2013, Gregory P. Ward and contributors.
  *
 
     int retval;
     sqlite3 *conn;
-    sqlite3_stmt    *res;
-    const char      *tail;
+    sqlite3_stmt *res;
+    const char *tail;
 
     if (!read_first_line(".svn/entries", buf, 1024)) {
         debug("failed to read from .svn/entries: not an svn working copy");
     }
     char line[1024];
 
-    if( access( ".svn/wc.db", F_OK ) == 0 ) {
+    if (access(".svn/wc.db", F_OK) == 0) {
         // Custom file format (working copy created by svn >= 1.7)
 
         retval = sqlite3_open(".svn/wc.db", &conn);
-        if(retval) {
-            debug("Can not open database");
+        if (retval) {
+            debug("error opening database in .svn/wc.db");
             goto err;
         }
         retval = sqlite3_prepare_v2(conn, "select max(revision) from NODES", 1000, &res, &tail);
-        if(retval) {
-            debug("Can not run the query");
+        if (retval) {
+            debug("error running query");
             goto err_sqlite;
         }
         else {