aboutsummaryrefslogtreecommitdiffstats
path: root/src/sysdep.c
diff options
context:
space:
mode:
authorAndreas Schwab2013-03-24 13:59:45 +0100
committerAndreas Schwab2013-03-24 13:59:45 +0100
commit908589fd28437a9b0995b103e22ce5e4d421eb8a (patch)
treece3a4207b04f84fdc97ee1ca2dfbc369fcf07c2a /src/sysdep.c
parent7b0e2f853fcd88c58715fd159923d50dfdeb9cba (diff)
downloademacs-908589fd28437a9b0995b103e22ce5e4d421eb8a.tar.gz
emacs-908589fd28437a9b0995b103e22ce5e4d421eb8a.zip
Reorder conditions that are written backwards
* alloc.c (xpalloc, Fgarbage_collect): Reorder conditions that are written backwards. * blockinput.h (input_blocked_p): Likewise. * bytecode.c (exec_byte_code): Likewise. * callproc.c (call_process_kill, call_process_cleanup) (Fcall_process): Likewise. * ccl.c (ccl_driver, resolve_symbol_ccl_program) (Fccl_execute_on_string): Likewise. * character.c (string_escape_byte8): Likewise. * charset.c (read_hex): Likewise. * cm.c (calccost): Likewise. * data.c (cons_to_unsigned): Likewise. * dired.c (directory_files_internal, file_name_completion): Likewise. * dispnew.c (scrolling_window, update_frame_1, Fsleep_for) (sit_for): Likewise. * doc.c (Fsubstitute_command_keys): Likewise. * doprnt.c (doprnt): Likewise. * editfns.c (hi_time, decode_time_components, Fformat): Likewise. * emacsgtkfixed.c: Likewise. * fileio.c (file_offset, Fwrite_region): Likewise. * floatfns.c (Fexpt, fmod_float): Likewise. * fns.c (larger_vector, make_hash_table, Fmake_hash_table): Likewise. * font.c (font_intern_prop): Likewise. * frame.c (x_set_alpha): Likewise. * gtkutil.c (get_utf8_string): Likewise. * indent.c (check_display_width): Likewise. * intervals.c (create_root_interval, rotate_right, rotate_left) (split_interval_right, split_interval_left) (adjust_intervals_for_insertion, delete_node) (interval_deletion_adjustment, adjust_intervals_for_deletion) (merge_interval_right, merge_interval_left, copy_intervals) (set_intervals_multibyte_1): Likewise. * keyboard.c (gobble_input, append_tool_bar_item): Likewise. * keymap.c (Fkey_description): Likewise. * lisp.h (FIXNUM_OVERFLOW_P, vcopy): Likewise. * lread.c (openp, read_integer, read1, string_to_number): Likewise. * menu.c (ensure_menu_items): Likewise. * minibuf.c (read_minibuf_noninteractive): Likewise. * print.c (printchar, strout): Likewise. * process.c (create_process, Faccept_process_output) (wait_reading_process_output, read_process_output, send_process) (wait_reading_process_output): Likewise. * profiler.c (make_log, handle_profiler_signal): Likewise. * regex.c (re_exec): Likewise. * regex.h: Likewise. * search.c (looking_at_1, Freplace_match): Likewise. * sysdep.c (get_child_status, procfs_ttyname) (procfs_get_total_memory): Likewise. * systime.h (EMACS_TIME_VALID_P): Likewise. * term.c (dissociate_if_controlling_tty): Likewise. * window.c (get_phys_cursor_glyph): Likewise. * xdisp.c (init_iterator, redisplay_internal, redisplay_window) (try_window_reusing_current_matrix, try_window_id, pint2hrstr): Likewise. * xfns.c (Fx_window_property): Likewise. * xmenu.c (set_frame_menubar): Likewise. * xselect.c (x_get_window_property, x_handle_dnd_message): Likewise. * xsmfns.c (smc_save_yourself_CB): Likewise. * xterm.c (x_scroll_bar_set_handle): Likewise.
Diffstat (limited to 'src/sysdep.c')
-rw-r--r--src/sysdep.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sysdep.c b/src/sysdep.c
index bff11fc9f75..1d3e646d359 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -282,7 +282,7 @@ get_child_status (pid_t child, int *status, int options, bool interruptible)
282 reap an unwanted process by mistake. For example, invoking 282 reap an unwanted process by mistake. For example, invoking
283 waitpid (-1, ...) can mess up glib by reaping glib's subprocesses, 283 waitpid (-1, ...) can mess up glib by reaping glib's subprocesses,
284 so that another thread running glib won't find them. */ 284 so that another thread running glib won't find them. */
285 eassert (0 < child); 285 eassert (child > 0);
286 286
287 while ((pid = waitpid (child, status, options)) < 0) 287 while ((pid = waitpid (child, status, options)) < 0)
288 { 288 {
@@ -2691,7 +2691,7 @@ procfs_ttyname (int rdev)
2691 2691
2692 while (!feof (fdev) && !ferror (fdev)) 2692 while (!feof (fdev) && !ferror (fdev))
2693 { 2693 {
2694 if (3 <= fscanf (fdev, "%*s %s %u %s %*s\n", name, &major, minor) 2694 if (fscanf (fdev, "%*s %s %u %s %*s\n", name, &major, minor) >= 3
2695 && major == MAJOR (rdev)) 2695 && major == MAJOR (rdev))
2696 { 2696 {
2697 minor_beg = strtoul (minor, &endp, 0); 2697 minor_beg = strtoul (minor, &endp, 0);
@@ -2731,7 +2731,7 @@ procfs_get_total_memory (void)
2731 2731
2732 while (!feof (fmem) && !ferror (fmem)) 2732 while (!feof (fmem) && !ferror (fmem))
2733 { 2733 {
2734 if (2 <= fscanf (fmem, "%s %lu kB\n", entry_name, &entry_value) 2734 if (fscanf (fmem, "%s %lu kB\n", entry_name, &entry_value) >= 2
2735 && strcmp (entry_name, "MemTotal:") == 0) 2735 && strcmp (entry_name, "MemTotal:") == 0)
2736 { 2736 {
2737 retval = entry_value; 2737 retval = entry_value;