byte_xasprintf((char **)&name, "trackname_%s_%s", context, part);
disorder_set(dcgi_client, file, name, value);
}
- if((value = numbered_arg("random", numfile)))
+ if(numbered_arg("random", numfile))
disorder_unset(dcgi_client, file, "pick_at_random");
else
disorder_set(dcgi_client, file, "pick_at_random", "0");
* @param direction -1 for prev, +1 for next
*/
static void choose_move(int direction) {
+ assert(direction); /* placate analyzer */
/* Refocus the main view so typahead find continues to work */
gtk_widget_grab_focus(choose_view);
/* If there's no results we have nothing to do */
/*
* This file is part of Disobedience
- * Copyright (C) 2007 Richard Kettlewell
+ * Copyright (C) 2007-2010 Richard Kettlewell
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
if(!(pid = xfork())) {
if(setsid() < 0)
disorder_fatal(errno, "error calling setsid");
- if(!(pid = xfork())) {
+ if(!xfork()) {
/* grandchild */
exitfn = _exit;
/* log errors and output somewhere reasonably sane. rtp_running()
for(i = 0; i < 10000; ++i) {
insist((ip = hash_find(h, do_printf("%d", i))) != 0);
- check_integer(*ip, i);
- insist(hash_add(h, do_printf("%d", i), &i, HASH_REPLACE) == 0);
+ if(ip) {
+ check_integer(*ip, i);
+ insist(hash_add(h, do_printf("%d", i), &i, HASH_REPLACE) == 0);
+ }
}
check_integer(hash_count(h), 10000);
keys = hash_keys(h);
t->playable = 1;
rc = 0;
}
- }
+ } else
+ rc = 0;
return rc;
}