diff options
| author | default <nobody@localhost> | 2026-08-26 08:05:16 +0200 |
|---|---|---|
| committer | default <nobody@localhost> | 2026-08-26 08:05:16 +0200 |
| commit | d7fc3d950d4654a3291066fed667f1b7d48e70bb (patch) | |
| tree | bd3c353caf64678650d0826c28dddde5e98261ea /data.c | |
| parent | 48aba53ddbca75bfdbda7d224c6d2c315fcd282a (diff) | |
Use snac_op in grave().
Diffstat (limited to 'data.c')
| -rw-r--r-- | data.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -3329,7 +3329,7 @@ int instance_failure(const char *url, snac_op op) } -int grave(const char *objid, int op) +int grave(const char *objid, snac_op op) /* the graveyeard of deleted objects */ { int ret = 0; @@ -3339,11 +3339,11 @@ int grave(const char *objid, int op) FILE *f; switch (op) { - case 0: /** check **/ + case OP_CHECK: /** check **/ ret = mtime(fn) > 0.0 ? 1 : 0; break; - case 1: /** add **/ + case OP_ADD: /** add **/ mkdirx(dir); if ((f = fopen(fn, "w")) != NULL) { @@ -3353,9 +3353,12 @@ int grave(const char *objid, int op) break; - case 2: /** del **/ + case OP_DEL: /** del **/ unlink(fn); break; + + default: + break; } return ret; |