diff --git a/include/Quota.h b/include/Quota.h index 756fe903d1..bf00b18049 100644 --- a/include/Quota.h +++ b/include/Quota.h @@ -182,7 +182,7 @@ private: * @param va limits for the new quota if 0 limits will be 0 * @param default_allowed whether or not the limit -1 is allowed * - * @return a new attribute representing the quota + * @return a new attribute representing the quota, 0 on error */ VectorAttribute * new_quota(VectorAttribute* va, bool default_allowed); diff --git a/src/um/Quota.cc b/src/um/Quota.cc index 74a2b95739..5ba6d55d83 100644 --- a/src/um/Quota.cc +++ b/src/um/Quota.cc @@ -413,7 +413,7 @@ VectorAttribute * Quota::new_quota(VectorAttribute * va, bool default_allowed) if ( (default_allowed && limit_i < -1) || (!default_allowed && limit_i < 0) ) { - limit = "0"; + return 0; } limits.insert(make_pair(metrics[i], limit));