From 62bd621610fefe92b6a8673c970623d071193786 Mon Sep 17 00:00:00 2001 From: Daniel Franke Date: Mon, 4 Dec 2006 16:35:19 -0500 Subject: [PATCH] re PR libgomp/29949 (implement argument checking for user accessable runtime routines) PR libgomp/29949 * env.c (omp_set_num_threads): Set illegal thread count to 1. From-SVN: r119511 --- libgomp/ChangeLog | 5 +++++ libgomp/env.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index e704b2356f1..92b5600239a 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,8 @@ +2006-12-04 Daniel Franke + + PR libgomp/29949 + * env.c (omp_set_num_threads): Set illegal thread count to 1. + 2006-12-04 Eric Botcazou * configure: Regenerate. diff --git a/libgomp/env.c b/libgomp/env.c index af7e0c5c813..f07b31b914b 100644 --- a/libgomp/env.c +++ b/libgomp/env.c @@ -225,7 +225,7 @@ initialize_env (void) void omp_set_num_threads (int n) { - gomp_nthreads_var = n; + gomp_nthreads_var = (n > 0 ? n : 1); } void