Whamcloud - gitweb
LU-7576 llapi: use dirname() in opendir_parent()
[fs/lustre-release.git] / lustre / quota / lquota_entry.c
index 8007f16..7adbc51 100644 (file)
@@ -20,7 +20,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright (c) 2012, Intel Corporation.
+ * Copyright (c) 2012, 2015, Intel Corporation.
  * Use is subject to license terms.
  *
  * Author: Johann Lombardi <johann.lombardi@intel.com>
@@ -217,7 +217,7 @@ struct lquota_site *lquota_site_alloc(const struct lu_env *env, void *parent,
 
        /* allocate hash table */
        memset(hashname, 0, sizeof(hashname));
-       sprintf(hashname, "LQUOTA_HASH%u", qtype);
+       snprintf(hashname, sizeof(hashname), "LQUOTA_HASH%hu", qtype);
        site->lqs_hash= cfs_hash_create(hashname, hash_lqs_cur_bits,
                                        HASH_LQE_MAX_BITS,
                                        min(hash_lqs_cur_bits,