summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--quotaops.c2
-rw-r--r--quotasys.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/quotaops.c b/quotaops.c
index 9e7e590..7b2f035 100644
--- a/quotaops.c
+++ b/quotaops.c
@@ -396,7 +396,7 @@ int writeindividualtimes(struct dquot *qlist, int outfd, char *name, int quotaty
else if (q->dq_dqb.dqb_btime <= now)
strcpy(btimestr, _("0seconds"));
else
- sprintf(btimestr, "%useconds", (unsigned)(q->dq_dqb.dqb_btime - now));
+ sprintf(btimestr, _("%useconds"), (unsigned)(q->dq_dqb.dqb_btime - now));
if (!q->dq_dqb.dqb_itime)
strcpy(itimestr, _("unset"));
else if (q->dq_dqb.dqb_itime <= now)
diff --git a/quotasys.c b/quotasys.c
index 70fdabe..16b59a6 100644
--- a/quotasys.c
+++ b/quotasys.c
@@ -332,13 +332,13 @@ void time2str(time_t seconds, char *buf, int flags)
*/
int str2timeunits(time_t num, char *unit, time_t *res)
{
- if (memcmp(unit, "second", 6) == 0)
+ if (!strcmp(unit, _("second")) || !strcmp(unit, _("seconds")))
*res = num;
- else if (memcmp(unit, "minute", 6) == 0)
+ else if (!strcmp(unit, _("minute")) || !strcmp(unit, _("minutes")))
*res = num * 60;
- else if (memcmp(unit, "hour", 4) == 0)
+ else if (!strcmp(unit, _("hour")) || !strcmp(unit, _("hours")))
*res = num * 60 * 60;
- else if (memcmp(unit, "day", 3) == 0)
+ else if (!strcmp(unit, _("day")) || !strcmp(unit, _("days")))
*res = num * 24 * 60 * 60;
else
return -1;