Browse code

bb6578 - Fixes TODO in session.c on converting to ENUM

Shawn Webb authored on 2013/03/02 04:01:20
Showing 2 changed files
... ...
@@ -21,10 +21,6 @@
21 21
 #ifndef __SCANNER_H
22 22
 #define __SCANNER_H
23 23
 
24
-#define TYPE_SCAN	0
25
-#define TYPE_CONTSCAN	1
26
-#define TYPE_MULTISCAN	2
27
-
28 24
 #include <sys/types.h>
29 25
 
30 26
 #include "libclamav/clamav.h"
... ...
@@ -32,6 +28,8 @@
32 32
 #include "thrmgr.h"
33 33
 #include "session.h"
34 34
 
35
+enum scan_type { TYPE_INIT = -1, TYPE_SCAN = 0, TYPE_CONTSCAN = 1, TYPE_MULTISCAN = 2 };
36
+
35 37
 struct scan_cb_data {
36 38
     int scantype;
37 39
     int odesc;
... ...
@@ -192,7 +192,7 @@ int command(client_conn_t *conn, int *virus)
192 192
     struct cl_engine *engine = conn->engine;
193 193
     unsigned int options = conn->options;
194 194
     const struct optstruct *opts = conn->opts;
195
-    int type = -1; /* TODO: make this enum */
195
+    enum scan_type type = TYPE_INIT;
196 196
     int maxdirrec;
197 197
     int ret = 0;
198 198
     int flags = CLI_FTW_STD;