Fix errors in native factory

This commit is contained in:
Dan Williams 2007-08-20 17:01:14 -04:00
parent f5f31627d3
commit 0408ea189d

View File

@ -29,6 +29,7 @@ THE SOFTWARE.
#include <errno.h> #include <errno.h>
#include <sys/wait.h> #include <sys/wait.h>
#include <dbus/dbus.h> #include <dbus/dbus.h>
#include <unistd.h>
char* prog; char* prog;
@ -76,7 +77,7 @@ remove_pid(pid_t pid)
{ {
int i; int i;
for (i=0; i<pidc; i++) for (i=0; i<pidc; i++)
if (pidv[i]=pid) if (pidv[i]==pid)
break; break;
if (i==pidc) if (i==pidc)
{ {
@ -293,7 +294,7 @@ int main(int argc, char **argv)
} }
if (result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) if (result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER)
{ {
fprintf(stderr, "%: could not become primary owner of %s\n", prog, service); fprintf(stderr, "%s: could not become primary owner of %s\n", prog, service);
exit(1); exit(1);
} }
@ -304,4 +305,6 @@ int main(int argc, char **argv)
while (dbus_connection_read_write_dispatch(connection, -1)) while (dbus_connection_read_write_dispatch(connection, -1))
; ;
_exit(0);
} }