aboutsummaryrefslogtreecommitdiffstats
path: root/util-src/signal.c
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-12-01 04:54:23 +0100
committerKim Alvefur <zash@zash.se>2017-12-01 04:54:23 +0100
commita586b19dfd852b998d51f09ef4c3d90693f869ad (patch)
treed52e9b6b8097ddc42cc9ae912b982a51195a6384 /util-src/signal.c
parent64361b4894092d2e73742444c78d7f5deb4b172c (diff)
parent8e6092d58a22c88cd97c15b6cefe60de8a53d307 (diff)
downloadprosody-a586b19dfd852b998d51f09ef4c3d90693f869ad.tar.gz
prosody-a586b19dfd852b998d51f09ef4c3d90693f869ad.zip
Merge 0.10->trunk
Diffstat (limited to 'util-src/signal.c')
-rw-r--r--util-src/signal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util-src/signal.c b/util-src/signal.c
index b94beffa..9e6f6f63 100644
--- a/util-src/signal.c
+++ b/util-src/signal.c
@@ -172,7 +172,7 @@ static void sighook(lua_State *L, lua_Debug *ar) {
lua_pushstring(L, LUA_SIGNAL);
lua_gettable(L, LUA_REGISTRYINDEX);
- for(int i = 1; i <= nsig; i--) {
+ for(int i = 0; i < nsig; i++) {
lua_pushnumber(L, signals[i]);
lua_gettable(L, -2);
lua_call(L, 0, 0);
@@ -196,7 +196,7 @@ static void handle(int sig) {
}
if(nsig < MAX_PENDING_SIGNALS) {
- signals[++nsig] = sig;
+ signals[nsig++] = sig;
}
}