]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Use tor_sscanf, not sscanf, in test_util.c.
authorNick Mathewson <nickm@torproject.org>
Thu, 2 Jun 2016 14:11:29 +0000 (10:11 -0400)
committerNick Mathewson <nickm@torproject.org>
Thu, 2 Jun 2016 14:11:29 +0000 (10:11 -0400)
Fixes the 0.2.7 case of bug #19213, which prevented mingw64 from
working.

changes/bug19213 [new file with mode: 0644]
src/test/test_util.c

diff --git a/changes/bug19213 b/changes/bug19213
new file mode 100644 (file)
index 0000000..f912ffb
--- /dev/null
@@ -0,0 +1,3 @@
+  o Minor bugfixes (compilation):
+    - Cause the unit tests to compile correctly on mingw64 versions
+      that lack sscanf. Fixes bug 19213. Bugfix on 0.2.7.1-alpha.
index 0a5783e9f5fa8bccab711076a709df8472056423..046e92ee18f7b6db60b719b77808bfc277183669 100644 (file)
@@ -4377,7 +4377,7 @@ test_util_writepid(void *arg)
   contents = read_file_to_str(fname, 0, NULL);
   tt_assert(contents);
 
-  int n = sscanf(contents, "%lu\n%c", &pid, &c);
+  int n = tor_sscanf(contents, "%lu\n%c", &pid, &c);
   tt_int_op(n, OP_EQ, 1);
 
 #ifdef _WIN32