]> granicus.if.org Git - strace/blobdiff - pathtrace.c
Introduce generic STRINGIFY and STRINGIFY_VAL macros
[strace] / pathtrace.c
index bc58ca4c699fcf50135150130e24c2b96dbad82c..9cb0ba77626617336197e8a8fa2dcdd4236c08e1 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2011 Comtrol Corp.
+ * Copyright (c) 2011-2017 The strace developers.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -32,8 +33,8 @@
 
 #include "syscall.h"
 
-const char **paths_selected = NULL;
-static unsigned num_selected = 0;
+const char **paths_selected;
+static unsigned int num_selected;
 
 /*
  * Return true if specified path matches one that we're tracing.
@@ -58,7 +59,7 @@ upathmatch(struct tcb *const tcp, const kernel_ulong_t upath)
 {
        char path[PATH_MAX + 1];
 
-       return umovestr(tcp, upath, sizeof path, path) > 0 &&
+       return umovestr(tcp, upath, sizeof(path), path) > 0 &&
                pathmatch(path);
 }