OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-link-grammar commits / b56ff86

lg_complete(): Improve the comment of failed fchdir()
b56ff8627192138d7a4d5e6854c344c96db40df2
by ampli <amirpli@gmail.com> · 2024-05-29T17:22:59.000Z

Changed files (2) +8 -7

link-parser/command-line.c +5 -5
……@@ -125,11 +125,11 @@ Switch default_switches[] =
125125/*
126126 * Record the parse options default values.
127127 *
128 * We must set here the string parse options to their static default
129 * value so they don't point to a static memory returned by the library
130 * (but anyway we need to do that for the test,debug and verbosity parse
131 * options because they might have been set by command line arguments
132 * just before this function is invoked.)
128 * Set the string parse options to their static default value so they
129 * don't point to a static (test, debug) or dynamic (dialect) memory of
130 * the library (but anyway we need to do that for the test,debug and
131 * verbosity parse options because they might have been set by command
132 * line arguments just before this function is invoked.)
133133 */
134134void save_default_opts(Command_Options *copts)
135135{
link-parser/lg_readline.c +3 -2
……@@ -376,8 +376,9 @@ static unsigned char lg_complete(EditLine *el, int ch)
376376 {
377377 if (fchdir(cwdfd) < 0)
378378 {
379 /* This shouldn't happen, unless maybe the directory to which
380 * cwdfd reveres becomes unreadable after cwdfd is created. */
379 /* Unexpected error: may occur only if the directory
380 * referenced by cwdfd becomes unreadable after cwdfd
381 * has been established. */
381382 printf("\nfchdir(): Cannot change directory back: %s\n",
382383 strerror(errno));
383384 }