diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-02-09 18:09:58 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-02-09 18:09:58 +0000 |
commit | 1b036c1ca9a311638e4b73e91055f7faee8ebed3 (patch) | |
tree | da62105d286c7cba2fe85783c02f3e697d42ecf4 /osdep-darwin.c | |
parent | c9cfc9a9f356386e07e6273f91dd3d46ca076c12 (diff) | |
download | rtmux-1b036c1ca9a311638e4b73e91055f7faee8ebed3.tar.gz rtmux-1b036c1ca9a311638e4b73e91055f7faee8ebed3.tar.bz2 rtmux-1b036c1ca9a311638e4b73e91055f7faee8ebed3.zip |
Return -1 not NULL on error. Doh.
Diffstat (limited to 'osdep-darwin.c')
-rw-r--r-- | osdep-darwin.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/osdep-darwin.c b/osdep-darwin.c index 441e5f57..8b37fca3 100644 --- a/osdep-darwin.c +++ b/osdep-darwin.c @@ -1,4 +1,4 @@ -/* $Id: osdep-darwin.c,v 1.5 2009-02-09 18:08:01 nicm Exp $ */ +/* $Id: osdep-darwin.c,v 1.6 2009-02-09 18:09:58 nicm Exp $ */ /* * Copyright (c) 2009 Joshua Elsasser <josh@elsasser.org> @@ -43,12 +43,12 @@ osdep_get_name(int fd, unused char *tty, unused pid_t *last_pid, char **name) struct kinfo_proc kp; if ((mib[3] = tcgetpgrp(fd)) == -1) - return (NULL); + return (-1); size = sizeof kp; if (sysctl(mib, 4, &kp, &size, NULL, 0) == -1 || kp.kp_proc.p_comm[0] == '\0') - return (NULL); + return (-1); return (strdup(kp.kp_proc.p_comm)); } |