]> arthur.barton.de Git - netatalk.git/blobdiff - libatalk/cnid/db3/cnid_db3_add.c
use log_debug rather than log_info for LOG inside ifdef DEBUG
[netatalk.git] / libatalk / cnid / db3 / cnid_db3_add.c
index 3879138b97e0cbe913022326ea4ceffe55b7e40b..f067df4224c6bf62fcd4186a5d0952c24fe35276 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_db3_add.c,v 1.2 2005-04-28 20:49:59 bfernhomberg Exp $
+ * $Id: cnid_db3_add.c,v 1.4 2009-10-29 13:17:29 didg Exp $
  *
  * Copyright (c) 1999. Adrian Sun (asun@zoology.washington.edu)
  * All Rights Reserved. See COPYRIGHT.
@@ -118,7 +118,6 @@ static cnid_t get_cnid(CNID_private *db)
     DBT rootinfo_key, rootinfo_data;
     DB_TXN *tid;
     int rc;
-    int flag;
     cnid_t hint,id;
 
     memset(&rootinfo_key, 0, sizeof(rootinfo_key));
@@ -155,14 +154,14 @@ retry:
         hint = htonl(id);
 /* #ifdef DEBUG */
 #if 0
-        LOG(log_info, logtype_default, "cnid_add: Found rootinfo for did %u, name %s as %u", ntohl(did), name, ntohl(hint));
+        LOG(log_debug, logtype_default, "cnid_add: Found rootinfo for did %u, name %s as %u", ntohl(did), name, ntohl(hint));
 #endif
         break;
     case DB_NOTFOUND:
         hint = htonl(CNID_START);
 /* #ifdef DEBUG */
 #if 0
-        LOG(log_info, logtype_default, "cnid_add: Using CNID_START for did %u, name %s", ntohl(did), name);
+        LOG(log_debug, logtype_default, "cnid_add: Using CNID_START for did %u, name %s", ntohl(did), name);
 #endif
         break;
     default:
@@ -203,7 +202,7 @@ cleanup_abort:
 
 /* ------------------------ */
 cnid_t cnid_db3_add(struct _cnid_db *cdb, const struct stat *st,
-                const cnid_t did, char *name, const int len,
+                const cnid_t did, char *name, const size_t len,
                 cnid_t hint)
 {
     CNID_private *db;
@@ -221,7 +220,7 @@ cnid_t cnid_db3_add(struct _cnid_db *cdb, const struct stat *st,
     /* ... Return id if it is valid, or if Rootinfo is read-only. */
     if (id || (db->flags & CNIDFLAG_DB_RO)) {
 #ifdef DEBUG
-        LOG(log_info, logtype_default, "cnid_add: Looked up did %u, name %s as %u", ntohl(did), name, ntohl(id));
+        LOG(log_debug, logtype_default, "cnid_add: Looked up did %u, name %s as %u", ntohl(did), name, ntohl(id));
 #endif
         return id;
     }
@@ -257,7 +256,7 @@ cnid_t cnid_db3_add(struct _cnid_db *cdb, const struct stat *st,
             return CNID_INVALID;
         case 0:
 #ifdef DEBUG
-            LOG(log_info, logtype_default, "cnid_add: Used hint for did %u, name %s as %u", ntohl(did), name, ntohl(hint));
+            LOG(log_debug, logtype_default, "cnid_add: Used hint for did %u, name %s as %u", ntohl(did), name, ntohl(hint));
 #endif
             return hint;
         }
@@ -277,7 +276,7 @@ cnid_t cnid_db3_add(struct _cnid_db *cdb, const struct stat *st,
     }
 
 #ifdef DEBUG
-    LOG(log_info, logtype_default, "cnid_add: Returned CNID for did %u, name %s as %u", ntohl(did), name, ntohl(hint));
+    LOG(log_debug, logtype_default, "cnid_add: Returned CNID for did %u, name %s as %u", ntohl(did), name, ntohl(hint));
 #endif
 
     return hint;