Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix three small warnings.

  • Loading branch information...
commit 49a8434e3707923940236017e5739cdc2c4d2b7a 1 parent 7ce4003
@nelhage nelhage authored
Showing with 7 additions and 9 deletions.
  1. +6 −3 functions.c
  2. +0 −5 popexec.c
  3. +1 −1  wcwidth.c
View
9 functions.c
@@ -1953,7 +1953,7 @@ void owl_function_delete_automsgs()
void owl_function_status()
{
- char buff[5000];
+ char buff[MAXPATHLEN+1];
time_t start;
int up, days, hours, minutes;
owl_fmtext fm;
@@ -1973,8 +1973,11 @@ void owl_function_status()
owl_fmtext_append_normal(&fm, "\n");
owl_fmtext_append_normal(&fm, " Current Directory: ");
- (void) getcwd(buff, MAXPATHLEN);
- owl_fmtext_append_normal(&fm, buff);
+ if(getcwd(buff, MAXPATHLEN) == NULL) {
+ owl_fmtext_append_normal(&fm, "<Error in getcwd>");
+ } else {
+ owl_fmtext_append_normal(&fm, buff);
+ }
owl_fmtext_append_normal(&fm, "\n");
sprintf(buff, " Startup Time: %s", ctime(&start));
View
5 popexec.c
@@ -72,11 +72,6 @@ owl_popexec *owl_popexec_new(char *command)
dup2(child_write_fd, 1 /*stdout*/);
dup2(child_write_fd, 2 /*stderr*/);
close(child_write_fd);
-
- while(0) {
- write(child_write_fd, "meep\n", 5);
- sleep(1);
- }
argv[0] = "sh";
argv[1] = "-c";
View
2  wcwidth.c
@@ -61,7 +61,7 @@
#include <wchar.h>
-static struct interval {
+struct interval { /* noproto */
int first;
int last;
};
Please sign in to comment.
Something went wrong with that request. Please try again.